[R-sig-Geo] Character vectors: paste

Sarah Goslee sarah.goslee at gmail.com
Thu Jul 24 21:20:10 CEST 2008


Sandra,

It isn't clear what you want.

Do you want to enter these names at the console? Or
do you have the names in a text file you'd like to
read in?

If the former,
mynames <- c("name1", "name2", "name3")
will create a vector containing the names.

If the latter,
mynames <- read.table("allnames.txt", as.is=TRUE)
will read the names into a data.frame that you can
convert to a vector using as.vector()

The R-help newsgroup is great for basic R questions that
don't really relate to geography topics.

Sarah

On Thu, Jul 24, 2008 at 3:16 PM,  <Sandra.Garcia at upct.es> wrote:
> Hello,
>
> Does anyone knows how I can paste in a character vector the following
> names of maps?
> LST2007001_1_16
> LST2007017_1_16
> LST2007033_1_16
> ..
> LST2007353_1_16
> LST2008001_1_16
> ..
>
> How I can implement this in R?
>
> Thanks in advance,
>
> Sandra
> UPCT
> (may be it is too basic ! excuse me, I am learning R).
>


-- 
Sarah Goslee
http://www.functionaldiversity.org




More information about the R-sig-Geo mailing list