Dear R-helpers,
I tried the playwith packages for the first time, and it crashed R:
> require(playwith)
Loading required package: playwith
Loading required package: lattice
Loading required package: grid
Loading required package: gWidgets
Loading required package: gWidgetsRGtk2
Loading required package: RGtk2
Loading required package: cairoDevice
> sessionInfo()
R version 2.7.1 (2008-06-23)
i386-apple-darwin8.10.1
locale:
en_US.UTF-8/en_US.UTF-8/C/C/en_US.UTF-8/en_US.UTF-8
attached base packages:
[1] grid stats graphics grDevices utils datasets
methods base
other attached packages:
[1] playwith_0.9-3 cairoDevice_2.8 gWidgetsRGtk2_0.0-35
RGtk2_2.12.5-3 gWidgets_0.0-28
[6] lattice_0.17-10
loaded via a namespace (and not attached):
[1] gridBase_0.4-3 tools_2.7.1
Making links in per-session dir ... done
> rownames(USArrests) <- state.name
> playwith(plot(Assault ~ UrbanPop, data=USArrests,
+ xlab="Percent urban population, 1973",
+ ylab="Assault arrests (per 100,000), 1973"))
*** caught bus error ***
address 0xa8, cause 'non-existent physical address'
Traceback:
1: .Call(L_newpage)
2: grid.newpage()
3: playNewPlot(playState)
4: playwith(plot(Assault ~ UrbanPop, data = USArrests, xlab =
"Percent urban population, 1973", ylab = "Assault arrests
(per
100,000), 1973"))
Possible actions:
1: abort (with core dump, if enabled)
2: normal R exit
3: exit R without saving workspace
4: exit R saving workspace
Selection:
Selection: 3
*** caught segfault ***
address 0x611912ca, cause 'memory not mapped'
Traceback:
1: .Call(L_newpage)
2: grid.newpage()
3: playNewPlot(playState)
4: playwith(plot(Assault ~ UrbanPop, data = USArrests, xlab =
"Percent urban population, 1973", ylab = "Assault arrests
(per
100,000), 1973"))
Possible actions:
1: abort (with core dump, if enabled)
2: normal R exit
3: exit R without saving workspace
4: exit R saving workspace
Selection: 2
Mac OS details:
System Version: Mac OS X 10.5.4 (9E17)
Kernel Version: Darwin 9.4.0
_____________________________
Professor Michael Kubovy
University of Virginia
Department of Psychology
USPS: P.O.Box 400400 Charlottesville, VA 22904-4400
Parcels: Room 102 Gilmer Hall
McCormick Road Charlottesville, VA 22903
Office: B011 +1-434-982-4729
Lab: B019 +1-434-982-4751
Fax: +1-434-982-4766
WWW: http://www.people.virginia.edu/~mk9y/
[[alternative HTML version deleted]]
Hi,
I have an list() like this:
$VAR1
Num Perc media stdev min P5 P10 P25
1 4381 56.35 181.35 39.81 87.13 123.05 132.59 152.95
2 1628 20.94 192.83 43.76 87.13 125.09 138.78 162.04
3 786 10.11 197.23 50.65 88.16 120.46 136.62 159.33
4 980 12.60 170.90 38.34 86.98 114.27 126.84 144.04
tot 7775 100.00 184.05 42.40 86.98 122.34 132.66 153.69
$VAR2
Num Perc media stdev min P5 P10 P25
1 4296 55.25 182.04 40.90 87.13 122.62 132.51 153.06
2 1634 21.02 191.57 43.81 86.98 126.87 137.04 160.35
3 695 8.94 189.29 46.98 88.16 120.15 132.29 155.60
4 1150 14.79 177.66 41.13 92.47 116.22 129.17 147.23
tot 7775 100.00 184.05 42.40 86.98 122.34 132.66 153.69
How can I export that into a .txt?
I tried the write.table but isn't working. It returns
Erro em data.frame(Q05 = c(4381, 1628, 786, 980, 7775, 56.35, 20.94, :
arguments imply differing number of rows: 5, 3, 4, 6>
Thanks for the help!
Leandro Marino
Dear Professor Kubovy I do not have a Mac to test it on, but please try this: library(cairoDevice) Cairo() grid::grid.newpage() I expect that you will see a similar crash; if so, it would seem to be a problem with your GTK+ libraries. I have heard that you need to have Apple X11 installed (from MacOS system CDs?) for RGtk2 to work. But I am not sure whether that advice is still current. Hope that helps. Felix On Tue, Jul 15, 2008 at 10:40 PM, Michael Kubovy <kubovy at virginia.edu> wrote:> Dear R-helpers, > > I tried the playwith packages for the first time, and it crashed R: > > > require(playwith) > Loading required package: playwith > Loading required package: lattice > Loading required package: grid > Loading required package: gWidgets > Loading required package: gWidgetsRGtk2 > Loading required package: RGtk2 > Loading required package: cairoDevice > > > sessionInfo() > R version 2.7.1 (2008-06-23) > i386-apple-darwin8.10.1 > > locale: > en_US.UTF-8/en_US.UTF-8/C/C/en_US.UTF-8/en_US.UTF-8 > > attached base packages: > [1] grid stats graphics grDevices utils datasets > methods base > > other attached packages: > [1] playwith_0.9-3 cairoDevice_2.8 gWidgetsRGtk2_0.0-35 > RGtk2_2.12.5-3 gWidgets_0.0-28 > [6] lattice_0.17-10 > > loaded via a namespace (and not attached): > [1] gridBase_0.4-3 tools_2.7.1 > > Making links in per-session dir ... done > > > rownames(USArrests) <- state.name > > playwith(plot(Assault ~ UrbanPop, data=USArrests, > + xlab="Percent urban population, 1973", > + ylab="Assault arrests (per 100,000), 1973")) > > *** caught bus error *** > address 0xa8, cause 'non-existent physical address' > > Traceback: > 1: .Call(L_newpage) > 2: grid.newpage() > 3: playNewPlot(playState) > 4: playwith(plot(Assault ~ UrbanPop, data = USArrests, xlab > "Percent urban population, 1973", ylab = "Assault arrests (per > 100,000), 1973")) > > Possible actions: > 1: abort (with core dump, if enabled) > 2: normal R exit > 3: exit R without saving workspace > 4: exit R saving workspace > Selection: > Selection: 3 > > *** caught segfault *** > address 0x611912ca, cause 'memory not mapped' > > Traceback: > 1: .Call(L_newpage) > 2: grid.newpage() > 3: playNewPlot(playState) > 4: playwith(plot(Assault ~ UrbanPop, data = USArrests, xlab > "Percent urban population, 1973", ylab = "Assault arrests (per > 100,000), 1973")) > > Possible actions: > 1: abort (with core dump, if enabled) > 2: normal R exit > 3: exit R without saving workspace > 4: exit R saving workspace > Selection: 2 > > Mac OS details: > System Version: Mac OS X 10.5.4 (9E17) > Kernel Version: Darwin 9.4.0 > > > > _____________________________ > Professor Michael Kubovy > University of Virginia > Department of Psychology > USPS: P.O.Box 400400 Charlottesville, VA 22904-4400 > Parcels: Room 102 Gilmer Hall > McCormick Road Charlottesville, VA 22903 > Office: B011 +1-434-982-4729 > Lab: B019 +1-434-982-4751 > Fax: +1-434-982-4766 > WWW: http://www.people.virginia.edu/~mk9y/ > > > > > > [[alternative HTML version deleted]] > > ______________________________________________ > 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. >-- Felix Andrews / ??? PhD candidate Integrated Catchment Assessment and Management Centre The Fenner School of Environment and Society The Australian National University (Building 48A), ACT 0200 Beijing Bag, Locked Bag 40, Kingston ACT 2604 http://www.neurofractal.org/felix/ 3358 543D AAC6 22C2 D336 80D9 360B 72DD 3E4C F5D8
On Tue, 2008-07-15 at 10:10 -0300, Leandro Marino wrote:> Hi, > > I have an list() like this: > > $VAR1 > Num Perc media stdev min P5 P10 P25 > 1 4381 56.35 181.35 39.81 87.13 123.05 132.59 152.95 > 2 1628 20.94 192.83 43.76 87.13 125.09 138.78 162.04 > 3 786 10.11 197.23 50.65 88.16 120.46 136.62 159.33 > 4 980 12.60 170.90 38.34 86.98 114.27 126.84 144.04 > tot 7775 100.00 184.05 42.40 86.98 122.34 132.66 153.69 > > $VAR2 > Num Perc media stdev min P5 P10 P25 > 1 4296 55.25 182.04 40.90 87.13 122.62 132.51 153.06 > 2 1634 21.02 191.57 43.81 86.98 126.87 137.04 160.35 > 3 695 8.94 189.29 46.98 88.16 120.15 132.29 155.60 > 4 1150 14.79 177.66 41.13 92.47 116.22 129.17 147.23 > tot 7775 100.00 184.05 42.40 86.98 122.34 132.66 153.69 > > How can I export that into a .txt? >Hi Leandro, You can probably get what you want with the delim.table function in the prettyR package. It exports lists as CSV files by default, but if you change the "delim" argument to "\t", it will give you something like the above. Jim