[R] Help with concatenation and arrays

Giovanni Petris GPetris at uark.edu
Wed Jun 26 18:22:19 CEST 2002


1) paste(x,y)

2) see the function 'which'. However the exact equality test ('==') is
   not appropriate here: you need to test for near equality.

Giovanni

 

> From: VBMorozov at lbl.gov
> Date: Wed, 26 Jun 2002 10:49:06 -0400
> Content-Language: en
> X-Accept-Language: en
> Content-Disposition: inline
> Sender: owner-r-help at stat.math.ethz.ch
> Precedence: SfS-bulk
> Content-Type: text/plain; charset=us-ascii
> Content-Length: 711
> 
> Dear R-guRus:
> I have 2 questions
> 
> 1) I have 2 variables, e.g. x<-5; y<-"Char"
> How do I create a new variable which would have both these values in a 
> string (e.g. "5Char", or "5 Char", etc ) ??
> 
> 2) if i have an array x[1:100], and I do x[x==345.123], how do I get 
> position j in the array of those x[j] which are equal to 345.123 ?
> 
> Thank you very much,
> Vlad.
> 
> 
> -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
> r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
> Send "info", "help", or "[un]subscribe"
> (in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
> _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
> 

-- 

 __________________________________________________
[                                                  ]
[ Giovanni Petris                 GPetris at uark.edu ]
[ Department of Mathematical Sciences              ]
[ University of Arkansas - Fayetteville, AR 72701  ]
[ Ph: (479) 575-6324, 575-8630 (fax)               ]
[ http://definetti.uark.edu/~gpetris/              ]
[__________________________________________________]

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._



More information about the R-help mailing list