Re: [R] 2D array of strings

2009-12-28 Thread Tony Plate

matrix(str, ncol=1)

Francesco Napolitano wrote:

Sorry for the dumb question, but I couldn't figure this out myself.

Consider the following:


str - c(abc,def)
array(str, c(2,1))

 [,1]
[1,] abc
[2,] def

How can i obtain the outcome of the second instruction without
specifying the number of rows?

Thank you in advance,
Francesco.

__
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.



__
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.


Re: [R] 2D array of strings

2009-12-28 Thread milton ruser
Hi Francesco,

Be carefull with create a object named str, because you crash str()
function. I don't know if it have implications on any package or functions.

bests

milton

On Mon, Dec 28, 2009 at 4:32 PM, Francesco Napolitano
franap...@gmail.comwrote:

 Sorry for the dumb question, but I couldn't figure this out myself.

 Consider the following:

  str - c(abc,def)
  array(str, c(2,1))
 [,1]
 [1,] abc
 [2,] def

 How can i obtain the outcome of the second instruction without
 specifying the number of rows?

 Thank you in advance,
 Francesco.

 __
 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.htmlhttp://www.r-project.org/posting-guide.html
 and provide commented, minimal, self-contained, reproducible code.


[[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.


Re: [R] 2D array of strings

2009-12-28 Thread David Winsemius


On Dec 28, 2009, at 4:24 PM, milton ruser wrote:


Hi Francesco,

Be carefull with create a object named str, because you crash str()
function. I don't know if it have implications on any package or  
functions.


Agree that is not a good idea, but don't agree with why. The action of  
creating an object with the same name will not generally crash the  
function but will often crash the wetware.


--
David.



bests

milton

On Mon, Dec 28, 2009 at 4:32 PM, Francesco Napolitano
franap...@gmail.comwrote:


Sorry for the dumb question, but I couldn't figure this out myself.

Consider the following:


str - c(abc,def)
array(str, c(2,1))

   [,1]
[1,] abc
[2,] def

How can i obtain the outcome of the second instruction without
specifying the number of rows?

Thank you in advance,
Francesco.

__
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.htmlhttp://www.r-project.org/posting-guide.html 


and provide commented, minimal, self-contained, reproducible code.



[[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.


__
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.