Levent,
I would suggest that you get your data the way you want it first, then use
the assign() function at the very end of your for() loop. I also think you
could simplify the arguments in your assign() function.
myfun <- function(dyolu, dadi, dsayi) {
for(i in 1:dsayi) {
ad <- paste(dadi, i, s
You have pasted together a string, and are now trying to treat it as a
data frame? I am not surprised at this error message.
Please take heed of this warning: you are in Circle 6 of the R Inferno
[1], and would benefit greatly from learning to put your
multiple-but-similarly-structured data in
Dear Users,
I have a little problem with user-defined function. I would like to remove
columns from a data frame using a user-defined function but i am getting a
"Error in ad[, -12] : incorrect number of dimensions” error. The
"ad<-ad[,-12]” and similar commands work from R console but i couldn
3 matches
Mail list logo