[R] write.csv fails with $ operator invalid for atomic

2009-12-01 Thread ggraves

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.

__
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.


Re: [R] write.csv fails with $ operator invalid for atomic

2009-12-01 Thread John Kane
Where does the table come from?

write.csv(t, file = t.csv)

looks like it would work



--- On Tue, 12/1/09, ggraves ggwra...@sfwmd.gov wrote:

 From: ggraves ggra...@sfwmd.gov
 Subject: [R]  write.csv fails with $ operator invalid for atomic
 To: r-help@r-project.org
 Received: Tuesday, December 1, 2009, 1:36 PM
 
 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.
 
 __
 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.
 


  __
Yahoo! Canada Toolbar: Search from anywhere on the web, and bookmark your 
favourite sites. Download it now
http://ca.toolbar.yahoo.com.

__
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.


Re: [R] write.csv fails with $ operator invalid for atomic

2009-12-01 Thread ggraves

It was in some documentation along with using data.frame and other entries that 
didn't work.  Can't explain why I didn't try it as is.
 
Gregory A. Graves
Lead Scientist
REstoration COoordination and VERification (RECOVER) 
Restoration Sciences Department
South Florida Water Management District
Phones:  DESK:  561 / 682 - 2429
  CELL:  561 / 719 - 8157
 



From: John Kane-2 [via R] [mailto:ml-node+932595-1696738...@n4.nabble.com]
Sent: Tue 12/1/2009 5:12 PM
To: Graves, Gregory
Subject: Re: [R] write.csv fails with $ operator invalid for atomic


Where does the table come from? 

write.csv(t, file = t.csv) 

looks like it would work 



--- On Tue, 12/1/09, ggraves [hidden email] 
http://n4.nabble.com/user/SendEmail.jtp?type=nodenode=932595i=0  wrote: 


 From: ggraves [hidden email] 
 http://n4.nabble.com/user/SendEmail.jtp?type=nodenode=932595i=1  
 Subject: [R]  write.csv fails with $ operator invalid for atomic 
 To: [hidden email] 
 http://n4.nabble.com/user/SendEmail.jtp?type=nodenode=932595i=2  
 Received: Tuesday, December 1, 2009, 1:36 PM 
 
 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. 
 
 __ 
 [hidden email] 
 http://n4.nabble.com/user/SendEmail.jtp?type=nodenode=932595i=3  
 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. 
 


  __ 
Yahoo! Canada Toolbar: Search from anywhere on the web, and bookmark your 
favourite sites. Download it now 
http://ca.toolbar.yahoo.com http://ca.toolbar.yahoo.com/ . 

__ 
[hidden email] 
http://n4.nabble.com/user/SendEmail.jtp?type=nodenode=932595i=4  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. 





View message @ 
http://n4.nabble.com/write-csv-fails-with-operator-invalid-for-atomic-tp932414p932595.html
 
To unsubscribe from write.csv fails with $ operator invalid for atomic, click 
here  (link removed)  . 


-- 
View this message in context: 
http://n4.nabble.com/write-csv-fails-with-operator-invalid-for-atomic-tp932414p932605.html
Sent from the R help mailing list archive at Nabble.com.

[[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.