ddply - envir must be either NULL
<p>My script is an R script.
I have this error message :
Error in eval.quoted(.variables, data) : 
  envir must be either NULL, a list, or an environment.
Calls: ddply -> splitter_d -> eval.quoted</p>

<pre><code>dataset = read.csv("/home/eby/Documents/Data/train_FD001_01.txt", sep="\t", header=TRUE, row.names=NULL)
dfrm &lt;- data.frame(dataset)
dataset &lt;- as.matrix(dfrm)

# generate the column RUL (remaining useful life)
library(plyr)

# get the maximum cycle number for each id
d1 &lt;- ddply(dataset,~id,summarise,max=max(cycle))
</code></pre>

<p>My dataset is :</p>

<pre><code>id      cycle
1       1
1       2
2       1
2       2
2       3
2       4
</code></pre>

<p>I want to get the maximum cycle number for each id.
My code runs under RapidMiner but not directly in RStudio.</p>