Its just a basic ifelse but its returning the error: “unexpected symbol” and points to the first character of the last line.
any ideas?
input1<-readline("using C:/Users/HouseGroup/Desktop/betterformat.csv as the target csv file.
Is this correct? Y/N" )
ifelse (input1=="Y",
theData <- read.csv("C:/Users/HouseGroup/Desktop/betterformat.csv"),
rightDir<- readline("please input the proper file path")
theData<- read.csv(rightDir))
You should use the standard
ifandelseconstruct in R, as defined by the R language definition.The command
ifelsetakes vectors and returns vectors. See?ifelsefor examples.