Re: [R] Matrix in R

2012-11-13 Thread Haszun
It's a bit complicated. Is there any shorter way? Is there possibility to read datas from .csv as matrix, like this which i want to have? -- View this message in context: http://r.789695.n4.nabble.com/Matrix-in-R-tp4649426p4649429.html Sent from the R help mailing list archive at Nabble.com. _

[R] Matrix in R

2012-11-13 Thread Haszun
Is there posiibility to read.table change in matrix? When i used read.table it gave me: V1 V2 V3 V4 [1,] "OsobaA" "10,00" "9,00" "8,00" [2,] "OsobaB" "2,00" "3,00" "1,00" [3,] "OsobaC" "5,00" "6,00" "4,00" I want to change it in: [1,] [2,] [3,] [4,

Re: [R] Matrix in R

2011-02-18 Thread David Winsemius
On Feb 18, 2011, at 9:32 AM, danielepippo wrote: but if in my function pp_ris2[i,j]=myfunction} must be the indexes 0-0,0-1,0-2,0-3, ? I came across a posting in r-help that called this package "blasphemy": http://cran.r-project.org/web/packages/Oarray/index.html -- David Winsemius

Re: [R] Matrix in R

2011-02-18 Thread David Winsemius
On Feb 18, 2011, at 9:32 AM, danielepippo wrote: but if in my function pp_ris2[i,j]=myfunction} must be the indexes 0-0,0-1,0-2,0-3, ? From a search of RSiteSearch() that started with with terms: zero matrix indexing http://finzi.psych.upenn.edu/R/Rhelp02/archive/39031.html http://

Re: [R] Matrix in R

2011-02-18 Thread Philipp Pagel
On Fri, Feb 18, 2011 at 06:32:01AM -0800, danielepippo wrote: > > but if in my function > pp_ris2[i,j]=myfunction} > must be the indexes 0-0,0-1,0-2,0-3, ? You'll have to take care of that yourself with a bit of index arithmetics. It's the same you encounter in C, if you are modelling somet

[R] Matrix in R

2011-02-18 Thread danielepippo
Hi everyone, I'm building a matrix in R with a cycle for like this: pp_ris2=matrix(NA,6,6) for(i in 0:6){ for(j in 0:6){ if(i>j){ pp_ris2[i,j]=myfunction} else if(i==j){ print(c(i,j)) pp_ris2[i,j]=myfunction}

Re: [R] Matrix in R

2011-02-18 Thread danielepippo
but if in my function pp_ris2[i,j]=myfunction} must be the indexes 0-0,0-1,0-2,0-3, ? -- View this message in context: http://r.789695.n4.nabble.com/Matrix-in-R-tp3312748p3312780.html Sent from the R help mailing list archive at Nabble.com. __ R

Re: [R] Matrix in R

2011-02-18 Thread Dieter Menne
danielepippo wrote: > >I'm building a matrix in R with a cycle for like this: > pp_ris2=matrix(NA,6,6) > for(i in 0:6){ > . > R is not like c, indexing starts with 1. Dieter -- View this message in context: http://r.789695.n4.nabble.com/Matrix-in-R-tp3312748p3312764.html Sent from