Hello
Is it possible to save text as string values to the spreadsheet. I have a variable that is Categorical, with levels "C1", "C2" etc. If I use setValues, it is saved as numerical. Here is a simple version of what I am doing:
private = list(
.run = function() {
n<-42
IV<-rnorm(n)
IV2<-as.factor(paste0("C",ceiling(runif(n)*3)))
DV<-rnorm(n)
dataOut<-data.frame(IV=IV,IV2=IV2,DV=DV)
if (self$options$IVvalues) {
self$results$IVvalues$setValues(dataOut)
self$results$textOutput$setContent("Done!")
}
})
Many thanks,
Roger Watt
Saving text (string) data to the spreadsheet
Re: Saving text (string) data to the spreadsheet
hi roger,
it infers the type to put into the spreadsheet, from the type in R. so if you convert dataOut to a character vector, you should get a column of type text.
cheers
it infers the type to put into the spreadsheet, from the type in R. so if you convert dataOut to a character vector, you should get a column of type text.
cheers