[R] paste doesn't appear to paste?
Peter Dalgaard BSA
p.dalgaard at biostat.ku.dk
Wed Dec 5 23:56:11 CET 2001
Michaell Taylor <pols1oh at bestweb.net> writes:
> Sorry to be posting another question, but my learning curve is starting to
> flatten some now.
>
> What am I missing here?
>
> > temp _ name[reis==toupper(location[order(Vgrablow2)][N])]
> > temp
> [1] "Lawton"
> > paste(temp,g)
> [1] "Lawton" # WHERE IS THE SECOND ELEMENT?
> > g
> [1] 0.29
> > a _ "Lawton"
> > paste(a,g)
> [1] "Lawton 0.29" # THIS WORKS (SECOND ELEMENT EXISTS ALSO)
> > mode(a)
> [1] "character"
> > mode(temp)
> [1] "character" # TEMP AND A ARE BOTH CHARACTERS
> > paste(temp,g,sep="---")
> [1] "Lawton" # DOESN'T EVEN GIVE THE SEPERATOR
> > paste(a,g,sep="---")
> [1] "Lawton---0.29"
>
>
>
> extraneous info:
>
> > mode(reis)
> [1] "character"
> > mode(location)
> [1] "character"
Nothing obvious. We may have a bug and/or something odd sneaked into
the "name" vector. What's the version info, btw?
You could try
dput(temp)
a==temp
--
O__ ---- Peter Dalgaard Blegdamsvej 3
c/ /'_ --- Dept. of Biostatistics 2200 Cph. N
(*) \(*) -- University of Copenhagen Denmark Ph: (+45) 35327918
~~~~~~~~~~ - (p.dalgaard at biostat.ku.dk) FAX: (+45) 35327907
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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