[R] Odp: Moving data in a dataset

Petr PIKAL petr.pikal at precheza.cz
Wed Sep 14 12:19:17 CEST 2011


Hi

> [R] Moving data in a dataset
> 
> Dear all,
> 
> i'm relatively new to R and so my question could be considered stupid.. 
By
> the way..
> 
> I have a dataset and i would like to move data from a cell to another
> specific cell. Hw can i do??

What is cell? And how do you want to "move" data?

BTW. What type of data? Matrix, data frame, vector, list, ...

I can imagine for instance

> mat<-matrix(rnorm(4), 2,2)
> mat
           [,1]      [,2]
[1,] -1.1336516 0.8050537
[2,]  0.9676428 0.9532624
> mat[2,2]<-mat[1,1]
> mat
           [,1]       [,2]
[1,] -1.1336516  0.8050537
[2,]  0.9676428 -1.1336516
>

But it seems to me that this is not what you want.

Regards
Petr


> 
> Thanks for your help!!
> 
> Vi
> 
> --
> View this message in context: http://r.789695.n4.nabble.com/Moving-data-
> in-a-dataset-tp3812083p3812083.html
> Sent from the R help mailing list archive at Nabble.com.
> 
> ______________________________________________
> R-help at 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.



More information about the R-help mailing list