Hi everyone,
I am trying to use the values from every cell of the data frame in a
further calculation.
This is the code that I am using to catch every element of the data-frame.

while (a<=10)
{
while (b<=10)
{
n<-as.numeric(df[a,b)];
...;
}
}

The problem is that when I print out 'n' I get the following errors :
"NULL" (if printed without as.numeric), and "numeric(0)" if printed with
the as.numeric.

Again, if I use the same command without the loop, it gives the correct
answer.

Would be grateful for your inputs and ideas on this matter. Thanks in
advance,
Sahana.

        [[alternative HTML version deleted]]

______________________________________________
R-help@r-project.org 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