Open mauriceflorence opened 11 years ago
I am having the exact same error messages...
Have any luck yet, kloliv?
Not yet. I went onto the "R" help forum and got some help but I do not understand the message.. (I am new to R as well)
Here is what they said. Let me know if you can make sense of it and maybe we can help each other out?
"Hi,
One problem with your example dataset is that you have 11 list elements
with the last one having different dimensions. I think it was based on
summarized
.
Then, the second problem I encountered for testing is that the dataset you
provided doesn't fulfill the criteria.
lst1<- list(structure(list......) #output of dput
lst2<- lst1[1:10] #deleted the last list element lst3<-lapply(lst2,function(x) {x$V3<- as.character(x$V3);x}) #here if I apply one of the conditions, none of the list elements fulfill the criteria
lapply(lst3,function(x) subset(x,V1==6 & V6>300 & V6<3000,select="V6"))
#
#
set.seed(24) lst4<- lapply(lst3,function(x) {x$V1<- sample(c(0,3,6),nrow(x),replace=TRUE);x})
not provided. res<-t(sapply(lst4,function(x) {block4<-x[with(x,V1==3 & V6>300 & V6<3000),"V6"];block7<- x[with(x,V1==6 & V6>300 & V6<3000),"V6"];block4.m<- mean(block4);block7.m<- mean(block7);block4.sd<-sd(block4);block7.sd<- sd(block7);full<- x[with(x,(V1==3|V1==6) & (V6 >300) & (V6 <3000)),"V6"]; full.sd<- sd(full);diff1<-block7.m-block4.m;d<- diff1/full.sd; c(block4.m, block4.sd,block7.m,block7.sd,diff1,full.sd,d) })) colnames(res)<- c("block4.m","block4.sd","block7.m","block7.sd","diff1"," full.sd","d")"
On Wed, Jul 3, 2013 at 8:55 AM, mauriceflorence notifications@github.comwrote:
Have any luck yet, kloliv?
— Reply to this email directly or view it on GitHubhttps://github.com/winteram/IAT/issues/16#issuecomment-20425200 .
Have you had any luck???
Hello,
Everything has been working wonderfully thus far, but I've run into one problem. When I run the IATanalysis.R file in R studio, I receive the following lines of errors in return:
**
Error in is.data.frame(x) : (list) object cannot be coerced to type 'double' In addition: Warning messages: 1: In mean.default(subset(data.list[[i]], V1 == 3 & V6 > 300 & V6 < : argument is not numeric or logical: returning NA 2: In mean.default(subset(data.list[[i]], V1 == 6 & V6 > 300 & V6 < : argument is not numeric or logical: returning NA
**
To be sure, the summarized.csv file is being generated, and updated properly with each new output. However, as the above error reads, there is no data in the resulting summarized.csv file: only returned NAs.
I have not altered the IATanalysis.R file at all, so I suppose I must be running it incorrectly (a distinct possibility, since I am quite new to R!).
Any help is greatly appreciated.
Thank you.