Hello, I tried to turn lists into vectors and then bind them together in order to create a dataframe but if, after this, I try to use the function write.table I get the following error message: Error in write.table(x, file, nrow(x), p, rnames, sep, eol, na, dec, as.integer(quote), : 'list' type not implemented in 'EncodeElement' Here is what I've done: as.vector(c(unique(portate$Anno)))->anno as.vector(loadListPO4)->loadPO4 as.vector(loadListPTG)->loadPTG as.vector(loadListNT)->loadNT as.vector(loadListNH4)->loadNH4 as.vector(loadListNO3)->loadNO3 as.vector(loadListBOD5)->loadBOD5 as.vector(loadListSiO2)->loadSiO2 cbind(anno,loadPTG,loadPO4,loadNT,loadNH4,loadNO3,loadBOD5,loadSiO2)->carichi as.data.frame(carichi)->carichi.annui #if I type carichi.annui #I get anno loadPTG loadPO4 loadNT loadNH4 loadNO3 loadBOD5 loadSiO2 1 2002 3.399518 1.382235 390.6959 22.07992 256.2244 492.9177 150.6505 2 2003 1.559606 0.6271712 202.9181 6.198592 145.9498 63.07578 68.08632 3 2004 2.363862 0.9493779 292.0841 12.21207 200.2545 141.0533 105.2409 4 2005 1.655554 0.6570313 217.2192 6.58045 155.7393 66.44154 73.0394 5 2006 1.827174 0.7290634 235.7914 7.858396 166.8327 79.2474 80.92576 6 2007 1.742629 0.6891045 228.0253 7.130082 162.6692 71.91434 77.22507 7 2008 0.8382246 0.3612176 110.9079 2.024197 86.60459 25.46127 32.9733 #which looks lika a data frame #And if I type is.data.frame(carichi.annui) # I get this: [1] TRUE #but if I try write.table(carichi.annui, "carichi.annui.lav") #It doesn't work?!?!?! Does someone have an explanation? Thanks a lot for any help!! Laura
Hi r-help-bounces at r-project.org napsal dne 20.02.2009 08:56:39:> Hello, > I tried to turn lists into vectors and then bind them together in orderto> create a dataframe but if, after this, I > try to use the function write.table I get the following error message: > Error in write.table(x, file, nrow(x), p, rnames, sep, eol, na, dec, > as.integer(quote), : > 'list' type not implemented in 'EncodeElement' > > Here is what I've done: > as.vector(c(unique(portate$Anno)))->anno > as.vector(loadListPO4)->loadPO4 > as.vector(loadListPTG)->loadPTG > as.vector(loadListNT)->loadNT > as.vector(loadListNH4)->loadNH4 > as.vector(loadListNO3)->loadNO3 > as.vector(loadListBOD5)->loadBOD5 > as.vector(loadListSiO2)->loadSiO2 >cbind(anno,loadPTG,loadPO4,loadNT,loadNH4,loadNO3,loadBOD5,loadSiO2)->carichi> as.data.frame(carichi)->carichi.annui > > #if I type > carichi.annui > #I get > anno loadPTG loadPO4 loadNT loadNH4 loadNO3 loadBOD5 loadSiO2 > 1 2002 3.399518 1.382235 390.6959 22.07992 256.2244 492.9177 150.6505 > 2 2003 1.559606 0.6271712 202.9181 6.198592 145.9498 63.07578 68.08632 > 3 2004 2.363862 0.9493779 292.0841 12.21207 200.2545 141.0533 105.2409 > 4 2005 1.655554 0.6570313 217.2192 6.58045 155.7393 66.44154 73.0394 > 5 2006 1.827174 0.7290634 235.7914 7.858396 166.8327 79.2474 80.92576 > 6 2007 1.742629 0.6891045 228.0253 7.130082 162.6692 71.91434 77.22507 > 7 2008 0.8382246 0.3612176 110.9079 2.024197 86.60459 25.46127 32.9733 > > #which looks lika a data frame > #And if I type > is.data.frame(carichi.annui) > # I get this: > [1] TRUE > > #but if I try > write.table(carichi.annui, "carichi.annui.lav") > #It doesn't work?!?!?! > Does someone have an explanation?Difficuult, really difficult. We do not have data, your OS, R version, error message (if there is any). It reminds me like if your car stopped and you asked by phone somebody a question #It doesn't work?!?!?! What answer you expect in this case? BTW it works as expected> test=read.table("clipboard", header=T) > testanno loadPTG loadPO4 loadNT loadNH4 loadNO3 loadBOD5 loadSiO2 1 2002 3.3995180 1.3822350 390.6959 22.079920 256.22440 492.91770 150.65050 2 2003 1.5596060 0.6271712 202.9181 6.198592 145.94980 63.07578 68.08632 3 2004 2.3638620 0.9493779 292.0841 12.212070 200.25450 141.05330 105.24090 4 2005 1.6555540 0.6570313 217.2192 6.580450 155.73930 66.44154 73.03940 5 2006 1.8271740 0.7290634 235.7914 7.858396 166.83270 79.24740 80.92576 6 2007 1.7426290 0.6891045 228.0253 7.130082 162.66920 71.91434 77.22507 7 2008 0.8382246 0.3612176 110.9079 2.024197 86.60459 25.46127 32.97330> carichi.annui<-test > is.data.frame(carichi.annui)[1] TRUE> write.table(carichi.annui, "carichi.annui.lav")And I have carichi.annui.lav file in my working directory. Therefore you have to check yourself or at least provide some clues. Regards Petr> Thanks a lot for any help!! > Laura > > ______________________________________________ > R-help at r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guidehttp://www.R-project.org/posting-guide.html> and provide commented, minimal, self-contained, reproducible code.
> -----Original Message----- > From: r-help-bounces at r-project.org > [mailto:r-help-bounces at r-project.org] On Behalf Of > lauramorgana at bluewin.ch > Sent: Thursday, February 19, 2009 11:57 PM > To: r-help at r-project.org > Subject: [R] write.table > > Hello, > I tried to turn lists into vectors and then bind them > together in order to create a dataframe but if, after this, I > try to use the function write.table I get the following error message: > Error in write.table(x, file, nrow(x), p, rnames, sep, eol, > na, dec, as.integer(quote), : > 'list' type not implemented in 'EncodeElement' > > Here is what I've done: > as.vector(c(unique(portate$Anno)))->anno > as.vector(loadListPO4)->loadPO4 > as.vector(loadListPTG)->loadPTG > as.vector(loadListNT)->loadNT > as.vector(loadListNH4)->loadNH4 > as.vector(loadListNO3)->loadNO3 > as.vector(loadListBOD5)->loadBOD5 > as.vector(loadListSiO2)->loadSiO2 > cbind(anno,loadPTG,loadPO4,loadNT,loadNH4,loadNO3,loadBOD5,loa > dSiO2)->carichi > as.data.frame(carichi)->carichi.annui > > #if I type > carichi.annui > #I get > anno loadPTG loadPO4 loadNT loadNH4 loadNO3 loadBOD5 loadSiO2 > 1 2002 3.399518 1.382235 390.6959 22.07992 256.2244 > 492.9177 150.6505 > 2 2003 1.559606 0.6271712 202.9181 6.198592 145.9498 > 63.07578 68.08632 > 3 2004 2.363862 0.9493779 292.0841 12.21207 200.2545 > 141.0533 105.2409 > 4 2005 1.655554 0.6570313 217.2192 6.58045 155.7393 > 66.44154 73.0394 > 5 2006 1.827174 0.7290634 235.7914 7.858396 166.8327 > 79.2474 80.92576 > 6 2007 1.742629 0.6891045 228.0253 7.130082 162.6692 > 71.91434 77.22507 > 7 2008 0.8382246 0.3612176 110.9079 2.024197 86.60459 > 25.46127 32.9733 > > #which looks lika a data frame > #And if I type > is.data.frame(carichi.annui) > # I get this: > [1] TRUE > > #but if I try > write.table(carichi.annui, "carichi.annui.lav") > #It doesn't work?!?!?! > Does someone have an explanation? > Thanks a lot for any help!! > Laura >Laura, What do you mean by "It doesn't work"? Do you get error messages? Or, do you just not get what you want? And if so, what is that you want? Dan Daniel Nordlund Bothell, WA USA
Hi Laura, You need to specify where you want to write your table. Like this... write.table(result, file="C:/Documents and Settings/simonp/Desktop/result.csv", sep = ",",row.names = F) If you have to do this alot I think you can set your working drive up to always write table in the same place... setwd("C:/Documents and Settings/simonp/Desktop/") If you wanna get really smart you can download a pckage called RDCOMClient from the omegahat repository. This enables you to open tables and view them on screen using excel (amongst a plethora of other things) Hope this helps? S ----- Original Message ----- From: <lauramorgana at bluewin.ch> To: <r-help at r-project.org> Sent: Friday, February 20, 2009 7:56 AM Subject: [R] write.table> Hello, > I tried to turn lists into vectors and then bind them together in order to > create a dataframe but if, after this, I > try to use the function write.table I get the following error message: > Error in write.table(x, file, nrow(x), p, rnames, sep, eol, na, dec, > as.integer(quote), : > 'list' type not implemented in 'EncodeElement' > > Here is what I've done: > as.vector(c(unique(portate$Anno)))->anno > as.vector(loadListPO4)->loadPO4 > as.vector(loadListPTG)->loadPTG > as.vector(loadListNT)->loadNT > as.vector(loadListNH4)->loadNH4 > as.vector(loadListNO3)->loadNO3 > as.vector(loadListBOD5)->loadBOD5 > as.vector(loadListSiO2)->loadSiO2 > cbind(anno,loadPTG,loadPO4,loadNT,loadNH4,loadNO3,loadBOD5,loadSiO2)->carichi > as.data.frame(carichi)->carichi.annui > > #if I type > carichi.annui > #I get > anno loadPTG loadPO4 loadNT loadNH4 loadNO3 loadBOD5 loadSiO2 > 1 2002 3.399518 1.382235 390.6959 22.07992 256.2244 492.9177 150.6505 > 2 2003 1.559606 0.6271712 202.9181 6.198592 145.9498 63.07578 68.08632 > 3 2004 2.363862 0.9493779 292.0841 12.21207 200.2545 141.0533 105.2409 > 4 2005 1.655554 0.6570313 217.2192 6.58045 155.7393 66.44154 73.0394 > 5 2006 1.827174 0.7290634 235.7914 7.858396 166.8327 79.2474 80.92576 > 6 2007 1.742629 0.6891045 228.0253 7.130082 162.6692 71.91434 77.22507 > 7 2008 0.8382246 0.3612176 110.9079 2.024197 86.60459 25.46127 32.9733 > > #which looks lika a data frame > #And if I type > is.data.frame(carichi.annui) > # I get this: > [1] TRUE > > #but if I try > write.table(carichi.annui, "carichi.annui.lav") > #It doesn't work?!?!?! > Does someone have an explanation? > Thanks a lot for any help!! > Laura > > ______________________________________________ > R-help at 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. >
Sorry, I'm using R 2.8.1 on Microsoft Windows XP professional 2002 Service Pack 2. The error I get is Error in write.table(x, file, nrow(x), p, rnames, sep, eol,> na, dec, as.integer(quote), :'list' type not implemented in 'EncodeElement' The problem is that I can' t manage to save the dataframe... With other dataframe I usually have no problems!!!> > Hello, > I tried to turn lists into vectors and then bind them > together in order to create a dataframe but if, after this, I > try to use the function write.table I get the following error message: > Error in write.table(x, file, nrow(x), p, rnames, sep, eol, > na, dec, as.integer(quote), : > 'list' type not implemented in 'EncodeElement' > > Here is what I've done: > as.vector(c(unique(portate$Anno)))->anno > as.vector(loadListPO4)->loadPO4 > as.vector(loadListPTG)->loadPTG > as.vector(loadListNT)->loadNT > as.vector(loadListNH4)->loadNH4 > as.vector(loadListNO3)->loadNO3 > as.vector(loadListBOD5)->loadBOD5 > as.vector(loadListSiO2)->loadSiO2 > cbind(anno,loadPTG,loadPO4,loadNT,loadNH4,loadNO3,loadBOD5,loa > dSiO2)->carichi > as.data.frame(carichi)->carichi.annui > > #if I type > carichi.annui > #I get > anno loadPTG loadPO4 loadNT loadNH4 loadNO3 loadBOD5 loadSiO2 > 1 2002 3.399518 1.382235 390.6959 22.07992 256.2244 > 492.9177 150.6505 > 2 2003 1.559606 0.6271712 202.9181 6.198592 145.9498 > 63.07578 68.08632 > 3 2004 2.363862 0.9493779 292.0841 12.21207 200.2545 > 141.0533 105.2409 > 4 2005 1.655554 0.6570313 217.2192 6.58045 155.7393 > 66.44154 73.0394 > 5 2006 1.827174 0.7290634 235.7914 7.858396 166.8327 > 79.2474 80.92576 > 6 2007 1.742629 0.6891045 228.0253 7.130082 162.6692 > 71.91434 77.22507 > 7 2008 0.8382246 0.3612176 110.9079 2.024197 86.60459 > 25.46127 32.9733 > > #which looks lika a data frame > #And if I type > is.data.frame(carichi.annui) > # I get this: > [1] TRUE > > #but if I try > write.table(carichi.annui, "carichi.annui.lav") > #It doesn't work?!?!?! > Does someone have an explanation? > Thanks a lot for any help!! > Laura >Laura, What do you mean by "It doesn't work"? Do you get error messages? Or, do you just not get what you want? And if so, what is that you want? Dan Daniel Nordlund Bothell, WA USA ______________________________________________ R-help at 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.
Thank you for your advice, but I didn't manage to make it work... I tried carichi.annui <- data.frame(anno,loadPTG,loadPO4,loadNT,loadNH4,loadNO3,loadBOD5,loadSiO2) And I got this error message: Error in data.frame(anno, loadPTG, loadPO4, loadNT, loadNH4, loadNO3, : the arguments have a different numer of rows: 4, 1 If I do sapply(carichi.annui, class) I get: anno loadPTG loadPO4 loadNT loadNH4 loadNO3 loadBOD5 loadSiO2 "list" "list" "list" "list" "list" "list" "list" "list" I thought that the function as.vector() could turn a list of numbers into a vector... was I wrong? ----Messaggio originale---- Da: ripley at stats.ox.ac.uk Data: 20.02.2009 12.40 A: "lauramorgana at bluewin.ch"<lauramorgana at bluewin.ch> Copia: <r-help at r-project.org> Oggetto: Re: [R] write.table On Fri, 20 Feb 2009, lauramorgana at bluewin.ch wrote:> Sorry, I'm using R 2.8.1 on Microsoft Windows XP professional 2002 Service Pack 2. > The error I get is > Error in write.table(x, file, nrow(x), p, rnames, sep, eol, >> na, dec, as.integer(quote), : > 'list' type not implemented in 'EncodeElement' > The problem is that I can' t manage to save the dataframe... > With other dataframe I usually have no problems!!!What does sapply(carichi.annui, class) tell you? It would be better to use carichi.annui <- data.frame(anno,loadPTG,loadPO4,loadNT,loadNH4,loadNO3,loadBOD5,loadSiO2) as you don't need an intermediate matrix.> >> >> Hello, >> I tried to turn lists into vectors and then bind them >> together in order to create a dataframe but if, after this, I >> try to use the function write.table I get the following error message: >> Error in write.table(x, file, nrow(x), p, rnames, sep, eol, >> na, dec, as.integer(quote), : >> 'list' type not implemented in 'EncodeElement' >> >> Here is what I've done: >> as.vector(c(unique(portate$Anno)))->anno >> as.vector(loadListPO4)->loadPO4 >> as.vector(loadListPTG)->loadPTG >> as.vector(loadListNT)->loadNT >> as.vector(loadListNH4)->loadNH4 >> as.vector(loadListNO3)->loadNO3 >> as.vector(loadListBOD5)->loadBOD5 >> as.vector(loadListSiO2)->loadSiO2 >> cbind(anno,loadPTG,loadPO4,loadNT,loadNH4,loadNO3,loadBOD5,loa >> dSiO2)->carichi >> as.data.frame(carichi)->carichi.annui >> >> #if I type >> carichi.annui >> #I get >> anno loadPTG loadPO4 loadNT loadNH4 loadNO3 loadBOD5 loadSiO2 >> 1 2002 3.399518 1.382235 390.6959 22.07992 256.2244 >> 492.9177 150.6505 >> 2 2003 1.559606 0.6271712 202.9181 6.198592 145.9498 >> 63.07578 68.08632 >> 3 2004 2.363862 0.9493779 292.0841 12.21207 200.2545 >> 141.0533 105.2409 >> 4 2005 1.655554 0.6570313 217.2192 6.58045 155.7393 >> 66.44154 73.0394 >> 5 2006 1.827174 0.7290634 235.7914 7.858396 166.8327 >> 79.2474 80.92576 >> 6 2007 1.742629 0.6891045 228.0253 7.130082 162.6692 >> 71.91434 77.22507 >> 7 2008 0.8382246 0.3612176 110.9079 2.024197 86.60459 >> 25.46127 32.9733 >> >> #which looks lika a data frame >> #And if I type >> is.data.frame(carichi.annui) >> # I get this: >> [1] TRUE >> >> #but if I try >> write.table(carichi.annui, "carichi.annui.lav") >> #It doesn't work?!?!?! >> Does someone have an explanation? >> Thanks a lot for any help!! >> Laura >> > Laura, > > What do you mean by "It doesn't work"? Do you get error messages? Or, do > you just not get what you want? And if so, what is that you want? > > Dan > > Daniel Nordlund > Bothell, WA USA > > ______________________________________________ > R-help at 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. > > ______________________________________________ > R-help at 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. >-- Brian D. Ripley, ripley at stats.ox.ac.uk Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272866 (PA) Oxford OX1 3TG, UK Fax: +44 1865 272595
Thank you!!! unlist() worked perfectly!!! Have a nice weekend Laura ----Messaggio originale---- Da: petr.pikal at precheza.cz Data: 20.02.2009 14.58 A: <lauramorgana at bluewin.ch> Copia: <r-help at r-project.org> Oggetto: Re: [R] write.table Hi r-help-bounces at r-project.org napsal dne 20.02.2009 12:54:41:> Thank you for your advice, but I didn't manage to make it work... > I tried > > carichi.annui <- data.frame > (anno,loadPTG,loadPO4,loadNT,loadNH4,loadNO3,loadBOD5,loadSiO2) > > And I got this error message: > > Error in data.frame(anno, loadPTG, loadPO4, loadNT, loadNH4, loadNO3, :> the arguments have a different numer of rows: 4, 1 > > If I do > > sapply(carichi.annui, class) > > I get: > anno loadPTG loadPO4 loadNT loadNH4 loadNO3 loadBOD5 loadSiO2 > "list" "list" "list" "list" "list" "list" "list" "list" >Well, here is finally something. You can transfer lists to data frames. lll<-list(x=rnorm(5), y=rnorm(5)) do.call(data.frame,lll) or if you have "vector" list like that x<-list(rnorm(5))> x[[1]] [1] -0.7349324 -0.4697276 -1.2026201 -1.4366955 -1.4713526 use unlist> unlist(x)[1] -0.7349324 -0.4697276 -1.2026201 -1.4366955 -1.4713526>Regards Petr> I thought that the function as.vector() could turn a list of numbersinto a> vector... was I wrong? > > ----Messaggio originale---- > Da: ripley at stats.ox.ac.uk > Data: 20.02.2009 12.40 > A: "lauramorgana at bluewin.ch"<lauramorgana at bluewin.ch> > Copia: <r-help at r-project.org> > Oggetto: Re: [R] write.table > > On Fri, 20 Feb 2009, lauramorgana at bluewin.ch wrote: > > > Sorry, I'm using R 2.8.1 on Microsoft Windows XP professional 2002Service Pack 2.> > The error I get is > > Error in write.table(x, file, nrow(x), p, rnames, sep, eol, > >> na, dec, as.integer(quote), : > > 'list' type not implemented in 'EncodeElement' > > The problem is that I can' t manage to save the dataframe... > > With other dataframe I usually have no problems!!! > > What does sapply(carichi.annui, class) tell you? > > It would be better to use > > carichi.annui <- >data.frame(anno,loadPTG,loadPO4,loadNT,loadNH4,loadNO3,loadBOD5,loadSiO2)> > as you don't need an intermediate matrix. > > > > >> > >> Hello, > >> I tried to turn lists into vectors and then bind them > >> together in order to create a dataframe but if, after this, I > >> try to use the function write.table I get the following errormessage:> >> Error in write.table(x, file, nrow(x), p, rnames, sep, eol, > >> na, dec, as.integer(quote), : > >> 'list' type not implemented in 'EncodeElement' > >> > >> Here is what I've done: > >> as.vector(c(unique(portate$Anno)))->anno > >> as.vector(loadListPO4)->loadPO4 > >> as.vector(loadListPTG)->loadPTG > >> as.vector(loadListNT)->loadNT > >> as.vector(loadListNH4)->loadNH4 > >> as.vector(loadListNO3)->loadNO3 > >> as.vector(loadListBOD5)->loadBOD5 > >> as.vector(loadListSiO2)->loadSiO2 > >> cbind(anno,loadPTG,loadPO4,loadNT,loadNH4,loadNO3,loadBOD5,loa > >> dSiO2)->carichi > >> as.data.frame(carichi)->carichi.annui > >> > >> #if I type > >> carichi.annui > >> #I get > >> anno loadPTG loadPO4 loadNT loadNH4 loadNO3 loadBOD5loadSiO2> >> 1 2002 3.399518 1.382235 390.6959 22.07992 256.2244 > >> 492.9177 150.6505 > >> 2 2003 1.559606 0.6271712 202.9181 6.198592 145.9498 > >> 63.07578 68.08632 > >> 3 2004 2.363862 0.9493779 292.0841 12.21207 200.2545 > >> 141.0533 105.2409 > >> 4 2005 1.655554 0.6570313 217.2192 6.58045 155.7393 > >> 66.44154 73.0394 > >> 5 2006 1.827174 0.7290634 235.7914 7.858396 166.8327 > >> 79.2474 80.92576 > >> 6 2007 1.742629 0.6891045 228.0253 7.130082 162.6692 > >> 71.91434 77.22507 > >> 7 2008 0.8382246 0.3612176 110.9079 2.024197 86.60459 > >> 25.46127 32.9733 > >> > >> #which looks lika a data frame > >> #And if I type > >> is.data.frame(carichi.annui) > >> # I get this: > >> [1] TRUE > >> > >> #but if I try > >> write.table(carichi.annui, "carichi.annui.lav") > >> #It doesn't work?!?!?! > >> Does someone have an explanation? > >> Thanks a lot for any help!! > >> Laura > >> > > Laura, > > > > What do you mean by "It doesn't work"? Do you get error messages? Or,do> > you just not get what you want? And if so, what is that you want? > > > > Dan > > > > Daniel Nordlund > > Bothell, WA USA > > > > ______________________________________________ > > R-help at r-project.org mailing list > > https://stat.ethz.ch/mailman/listinfo/r-help > > PLEASE do read the posting guidehttp://www.R-project.org/posting-guide.html> > and provide commented, minimal, self-contained, reproducible code. > > > > ______________________________________________ > > R-help at r-project.org mailing list > > https://stat.ethz.ch/mailman/listinfo/r-help > > PLEASE do read the posting guidehttp://www.R-project.org/posting-guide.html> > and provide commented, minimal, self-contained, reproducible code. > > > > -- > Brian D. Ripley, ripley at stats.ox.ac.uk > Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ > University of Oxford, Tel: +44 1865 272861 (self) > 1 South Parks Road, +44 1865 272866 (PA) > Oxford OX1 3TG, UK Fax: +44 1865 272595 > > ______________________________________________ > R-help at r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guidehttp://www.R-project.org/posting-guide.html> and provide commented, minimal, self-contained, reproducible code.