[R] Can't event start 'rattle' under Ubuntu 64bit
Dear all, I've wanted to give a try to the rattle GUI for R. After long struggle with dependencies I've finally managed to install rattle and all of its dependencies, although for some of them I've been forced to use cran2deb. And now all I get is: library(rattle) Loading required package: pmml Loading required package: XML Loading required package: RGtk2 Loading required package: colorspace Rattle: Graphical interface for data mining using R. Version 2.5.39 Copyright (c) 2006-2010 Togaware Pty Ltd. Type 'rattle()' to shake, rattle, and roll your data. rattle() Error: attempt to apply non-function In addition: Warning message: In method(obj, ...) : Invalid object type `GtkFrame' Rattle timestamp (for the error above): 2010-09-10 17:24:14 As an addition a blank window appears. And I'm stuck. Can anyone - please - point me in the right direction? Best, Kamil __ 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.
[R] Removing empty (or very underpopulated) sub-populations
Hi, I'm trying to develop a function that will simplify the most common analyses in my area of interest (social sciences) by computing all required statistics at one run (for exaple in case of a factor and numeric variable: 1) normality test, then in case variable are normal 2) ANOVA 3) with efect-size estimation and aprropriate graph). I test normality in each group with this code: are.normal - c() group - as.factor(group) for (i in 1:length(levels(factor(group { are.normal[i] - normality(response[group==levels(factor(group))[i]]) } whrere: 1) response is response (numeric variable), 2) group is grouping variable (factor), 4) normality is a function which takes one variable as argument, and the tries to figure out wheter it's normal (TRUE) or not (FALSE). My problem is that sometimes, some combinations of response~group produce empty populations or very underpopulated (eg. situation when you examine relation between country of origin and age of respondents, and it turns out, that you have only one guy from some country). It causes a failure of my function. I've been wondering wheter there is some way to exclude those underpopulated groups from analysis? Best regards, Kamil Sijko [[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.
Re: [R] Error while trying to save summary() output as csv
Thank you David, thank you Ista - as.matrix solves the problem. Best regards, Kamil Sijko +48.790.818.212 2010/3/22 David Winsemius dwinsem...@comcast.net: On Mar 22, 2010, at 3:06 PM, Ista Zahn wrote: Hi Kamil, You can use something like write.csv(t(as.matrix(object)), file=name.csv) -Ista On Mon, Mar 22, 2010 at 2:54 PM, Kamil Sijko kamil.si...@swps.edu.pl wrote: Hi, I need to save output of summary() procedure to a csv file. It's all OK when it's applied to a 'factor' class variable, but when I try to save a 'integer' class summary to csv it gives me : summary(rnorm(100, 10)) - object write.csv2(object, file='name.csv') Error in do.call(expand.grid, c(dimnames(x), stringsAsFactors = stringsAsFactors)) : second argument must be a list It's the same when I use write.csv instead of write.csv2 summary() produces a very simple table: structure(c(7.803, 9.633, 10.15, 10.17, 10.75, 12.41), .Names = c(Min., 1st Qu., Median, Mean, 3rd Qu., Max.), class = table) I have no idea, what to do... So Group, please help me: what does this error mean, and how to cope with it? Not sure why you got that error but if you convert that table into a matrix the writing proceeds as expected: write.csv(as.matrix(structure(c(7.803, 9.633, 10.15, 10.17, 10.75, 12.41), .Names = c(Min., 1st Qu., Median, Mean, 3rd Qu., Max.), class = table) ), file=test.csv) -- David. Thanks for your help. Kamil __ 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. -- Ista Zahn Graduate student University of Rochester Department of Clinical and Social Psychology http://yourpsyche.org __ 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. __ 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.
[R] Error while trying to save summary() output as csv
Hi, I need to save output of summary() procedure to a csv file. It's all OK when it's applied to a 'factor' class variable, but when I try to save a 'integer' class summary to csv it gives me : summary(rnorm(100, 10)) - object write.csv2(object, file='name.csv') Error in do.call(expand.grid, c(dimnames(x), stringsAsFactors = stringsAsFactors)) : second argument must be a list It's the same when I use write.csv instead of write.csv2 summary() produces a very simple table: structure(c(7.803, 9.633, 10.15, 10.17, 10.75, 12.41), .Names = c(Min., 1st Qu., Median, Mean, 3rd Qu., Max.), class = table) I have no idea, what to do... So Group, please help me: what does this error mean, and how to cope with it? Thanks for your help. Kamil __ 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.