[R] paste doesn't appear to paste?

Ott Toomet siim at obs.ee
Thu Dec 6 08:24:12 CET 2001


Hi,

My knowledge about R is somewhat limited but I had a bit similar problem
with paste a month or so ago (you can search the topic ,,bug and paste'' or
something similar in the archive).

That time the problem seemed to be that I had read my data in as stata-file using
read.dta, and seemed that it was a kind of bug in that function.  The
result was that the variables was stored into memory not correctly, an error
which did not affect print() but did affect paste() (or have I
misunderstood something?).  The problem vanished if I saved the data with
save() and read it again with load().

You did not explained how did you get your data but perhaps it helps.

Sincerely,

Ott Toomet
---------------------------------------------------
On Wed, 5 Dec 2001, Michaell Taylor wrote:

>
> 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"
>
>
> Michaell Taylor
> -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
> 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
> _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
>

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