Hi,

I got two questions :

1st Question
            a="S"
            b=data.frame(S=3)
            do.call(`<-`,list(do.call(`$`,list(b,"S")),5))
=> How can I put new values on S column having the column name as a variable ?

2 nd Question
       a="S"
       b=data.frame(S=3)
       b[,"S"]=list(1:10) #Doesnt works
       b$S=list(1:10) #Works
=> Isnt the same thing ? What is the difference between these two things ?


Thanks,

Une messagerie gratuite, garantie à vie et des services en plus, ça vous 
tente ?
Je crée ma boîte mail www.laposte.net

        [[alternative HTML version deleted]]

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to