1

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

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

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

# get the maximum cycle number for each id
d1 <- ddply(dataset,~id,summarise,max=max(cycle))

My dataset is :

id      cycle
1       1
1       2
2       1
2       2
2       3
2       4

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

dede
  • 91
  • 1
  • 7

0 Answers0