On Sat, Apr 24, 2010 at 9:31 AM, Dong GUO <[email protected]> wrote:
> Dear list,
>
> just to put it in a simple way:
>
> i read.csv from csv file to create a gdata
>
> then, create array gdata34
>
> however, when making a loop for assigning gdata34[1,m]<-gdata[m,4],
> this is what happen

So you assigned (m == 4)

gdata34[1, 4] <- gdata[4, 4]


> gdata[1,4] 's real value is 10354, however, the gdata34[1,4] turns to be 883

But now you expect
 gdata[1,4] == gdata34[1,4]

If your loop description is correct,
gdata34[1,4] <- gdata[4, 4]
and
gdata34[1,1] <- gdata[1,4]

Something is wrong either in your description or
your check. I don't think it has anything to do with
storage mode.

Sarah

> then i checked the type: gdata[1,4] is integer, while gdata34[1,4] is double.
>
> Can any one give me some help on it????
>
> Many thanks in advance.
>
> Best regards,
> Dong
>
-- 
Sarah Goslee
http://www.functionaldiversity.org

______________________________________________
[email protected] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to