Re: [R] Strings to Numbers?

From: JeeBee <>
Date: Fri 23 Jun 2006 - 05:20:53 EST

  My guess is there are factors in yearly (so your conference names are   not strings as you think they are).
  See ?factor (type "?factor" in R without the quotes).

  If you used something like read.csv to import your yearly from a file,   try adding there, that might also solve your problem.


> I am running the following command.
> for( i in 1:378){
> for (j in 1:5) {
> *********Year [((i-1)*5)+j,1]<- yearly[i,2];*********
> Year [((i-1)*5)+j,2] <- j;
> Year [((i-1)*5)+j,3] <- yearly[i,(j+2)];
> j <- (j+1);
> }
> i <- (i+1)
> }
> The array referenced yearly[i,2] contains conference names i.e. BIG12,
> SEC, BIG10. The loop executes fine except for the fact that instead
> of the strings from yearly, Year[,1] contains numbers.
> Any suggestions. mailing list PLEASE do read the posting guide! Received on Fri Jun 23 05:25:59 2006

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.1.8, at Fri 23 Jun 2006 - 08:13:29 EST.

Mailing list information is available at Please read the posting guide before posting to the list.