Hi all,

I have the following data

AAA  1e+06 1222.312
AAC  100.2  0.33

However the following command

dat <- read.table("mydat.txt");

print(dat)

n1 <- sum(as.matrix(dat$V1));

gives:
Error in sum(as.matrix(dat$V1)) : invalid 'type' (character) of argument


What's wrong with the data type so that it gives such error?


- Gundala Viswanath
Jakarta - Indonesia

______________________________________________
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