[R] write.csv fails with $ operator invalid for atomic
ggraves
ggraves at sfwmd.gov
Tue Dec 1 19:36:51 CET 2009
I want to export a csv file so I can do other things with it.
I issue this command to break down years as to whether it was windy or not:
t<-tapply(TURB,list(year,windy),mean,na.rm=T)
which results in:
> t
no yes
1990 21.516514 39.86400
1991 13.580435 28.87500
1992 12.171429 22.93913
1993 21.550893 26.41200
1994 12.003913 40.76928
1995 14.707917 35.39057
1996 22.041765 44.54927
1997 17.577625 31.60761
1998 26.283978 34.36190
1999 14.597922 43.85804
2000 30.805139 63.06042
2001 23.204545 36.64634
2002 21.062791 32.86696
2003 14.487111 33.68727
2004 36.294595 73.38125
2005 49.089583 114.28333
2006 44.941667 89.37917
2007 57.456667 70.00435
2008 52.251163 89.83864
2009 24.212821 37.49375
when I issue this command
write.csv(t$table, file = "t.csv")
I get the error
ERROR $ operator is invalid for atomic vectors
??
--
View this message in context: http://n4.nabble.com/write-csv-fails-with-operator-invalid-for-atomic-tp932414p932414.html
Sent from the R help mailing list archive at Nabble.com.
More information about the R-help
mailing list