[R] create arrays

Schatzi adele_thompson at cargill.com
Fri May 6 21:16:17 CEST 2011


I can get around it by doing something like:
as.matrix(rep(1,291))*row(as.matrix(rep(1,291)))/10+.9

I was just hoping for a simple command.


Schatzi wrote:
> 
> In Matlab, an array can be created from 1 - 30 using the command similar
> to R which is 1:30. Then, to make the array step by 0.1 the command is
> 1:0.1:30 which is 1, 1.1, 1.2,...,29.9,30. How can I do this in R?
> 


-----
In theory, practice and theory are the same. In practice, they are not - Albert Einstein
--
View this message in context: http://r.789695.n4.nabble.com/create-arrays-tp3503988p3503998.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list