[R] Illustrating kernel distribution in wheat ears

2010-01-10 Thread Carl-Göran CG . Pettersson
Dear all R2.10 WinXP I have a dataset dealing with the way different wheat cultivars build their yield. Wheat ears are organised in spikelets where the spikelets can be numbered from the bottom, with even numbers on one side and odd on the other. I know how many kernels there were in each spik

[R] Point plot comparisions

2010-01-10 Thread Marlin Keith Cox
I would like to create a point plot with the following two sets of points: #1 plot(Day,Total) and #2 (Day,cons_hat). Total is the actual value seen and cons-hat is a predicted value. If possible, I do not want to stack them as they are quite long. (FYI, I did use the reshape on a previous post,

[R] Problem about Box-Cox transformation (topic in html form)

2010-01-10 Thread Saji Ren
Hi: Recently, I want to perform a transformation on my data to make it more normal, meanwhile the order statistics is unchanged. So I decided to use a box-cox transformation. below is the qq-plot of the original data http://n4.nabble.com/file/n1011015/start%2Bvalue%2Bproblem%2B02.jpeg Note that

[R] Help me! using random Forest package, how to calculate Error Rates in the training set ?

2010-01-10 Thread bbslover
now I am learining random forest and using random forest package, I can get the OOB error rates, and test set rate, now I want to get the training set error rate, how can I do? pgp.rf<-randomForest(x.tr,y.tr,x.ts,y.ts,ntree=1e3,keep.forest=FALSE,do.trace=1e2) using the code can get oob and t

Re: [R] R exponential regression

2010-01-10 Thread Peter Ehlers
chrisli1223 wrote: Hi all, I have a dataset which consists of 2 columns. I'd like to plot them on a x-y scatter plot and fit an exponential trendline. I'd like R to determine the equation for the trendline and display it on the graph. Here's one way: f <- function(x,a,b) {a * exp(b * x)} #

Re: [R] How to control number of significant digits (figures) in y-axis?

2010-01-10 Thread Peter Ehlers
Use the 'scales=' argument together with formatC: x <- 1:10 y <- sample(10) xyplot(y ~ x, scales = list( y = list( at = 1:10, lab = formatC(1:10, format = "f", digits = 1 ?formatC ?xyplot -Peter Ehlers willow1980 wrote: Dear

Re: [R] Boxplot- input the median point and the median value

2010-01-10 Thread elaine kuo
Hello Jim, I tried your approach on box plot, and it is useful. Thanks. However, I wanna add the mean value right or left to the mean point. (as attached) Please kindly share if it is possible and thanks again. Elaine On Sat, Jan 2, 2010 at 5:01 PM, Jim Lemon wrote: > On 01/02/2010 12:53 PM,

Re: [R] R exponential regression

2010-01-10 Thread chrisli1223
Thank you very much Murray! Greatly appreciated. :] Chris Murray Cooper wrote: > > Chris, > > I haven't seen anyone post a reply yet so thought I'd > throw in my thoughts. I'm no R expert! > > When you talk about an exponential trend line are you > refering to: > > 1) y=ax^b > or > 2) y=ae^

Re: [R] How to control spaces between axis, tick and label in xyplot or xYplot?

2010-01-10 Thread Peter Ehlers
You don't provide reproducible code and your space bar seems to be broken (or perhaps, you're trying to save bandwidth by minimizing the number of characters sent), but this may be what you're after: myspacing <- 0.5 xyplot(Sepal.Length ~ Petal.Length | Species, data = iris, layout = c(3,1

Re: [R] R exponential regression

2010-01-10 Thread Murray Cooper
Chris, I haven't seen anyone post a reply yet so thought I'd throw in my thoughts. I'm no R expert! When you talk about an exponential trend line are you refering to: 1) y=ax^b or 2) y=ae^(bx) If 1) then take base10 logs of y and x and then fit them with simple linear regression. Then calcula

Re: [R] adding 3D arrows to 3D plots

2010-01-10 Thread Peter Ehlers
Cool, Barry. I set n=30, col="red" and stuck it into my daiquiri! -Peter Ehlers Barry Rowlingson wrote: Have a go with this: arrow3d <- function(p0=c(0,1,0),p1=c(1,1,1),s=0.1,theta=pi/4,n=3,...){ ##p0: start point ##p1: end point ## s: length of barb as fraction of line length

[R] problems with bigmemory

2010-01-10 Thread Eric Claus
Hi all, I am trying to read a large csv file (~11 Gb - ~900,000 columns, 3000 rows) using the read.big.matrix command from the bigmemory package. I am using the following command: x<-read.big.matrix('data.csv', sep=',', header=TRUE, type='char', backingfile='data.bin', descriptorfile='data.desc')

Re: [R] Tables to export to excel

2010-01-10 Thread Erich Neuwirth
There are a few different options for exporting matrices and dataframes from R to Excel. RExcel (an Excel addin available from rcom.univie.ac.at) allows you use a menu item "Get array" or "Get dataframe" to do this. Other options are described in Chapter 8 of the R Data Import/Export manual. There

Re: [R] Plotting numeric values against non numeric items

2010-01-10 Thread Peter Ehlers
Dennis and Sam, Re Dennis' lattice plot: Here's how you can superpose lines and points in the key. simpleKey() is not flexible enough, so we use the key list directly. dissolve <- data.frame( Method = rep(c('No Stir', 'Stir'), each = 2), Type = rep(c('Cube', 'Granules'), 2),

Re: [R] lme4 and function 'cholmod_start' not provided by package 'Matrix' / Ubuntu

2010-01-10 Thread Esmail
On 10-Jan-10 12:40, Douglas Bates wrote: As Dieter points out, this is likely a mismatch between the versions of the lme4 and the Matrix packages, which are very closely linked together. It appears that the version of the lme4 package is too old for the version of the Matrix package, which is ha

[R] Tables to export to excel

2010-01-10 Thread Orvalho Augusto
I am doing some tables with verry long and numerouses categories. Eg. Cause of Death Crossed by sex e then by group ages. Is it possible to have such crosstab sent to an excel file so I could easilly report. Thanks in advance Caveman -- OpenSource Software Consultant CENFOSS (www.cenfoss.co.mz

[R] ordering of additional columns in forest plot in meta package

2010-01-10 Thread Philip de Witt Hamer
Hi, I am trying to add additional columns to a forest plot using the meta package. The study information and subgroup analysis plotting is handled properly. For this output the data is ordered first by subgroup label (rnd.subgroup1 in the example) and second decreasing size of totals ('n' in the e

Re: [R] Calling FING.EXE under RGui.EXE for windows.

2010-01-10 Thread Gabor Grothendieck
That may be but given that tcl does not have the same problem it might still be something that would be desirable to address and it is possible that it is a symptom of a larger problem in R. It will more likely be lost if its buried in this discussion. On Sun, Jan 10, 2010 at 1:51 PM, Duncan Murd

Re: [R] adding 3D arrows to 3D plots

2010-01-10 Thread Barry Rowlingson
Have a go with this: arrow3d <- function(p0=c(0,1,0),p1=c(1,1,1),s=0.1,theta=pi/4,n=3,...){ ##p0: start point ##p1: end point ## s: length of barb as fraction of line length ## theta: opening angle of barbs ## n: number of barbs ## ...: args passed to lines3d for line styli

Re: [R] Calling FING.EXE under RGui.EXE for windows.

2010-01-10 Thread Duncan Murdoch
On 10/01/2010 1:42 PM, Gabor Grothendieck wrote: Perhaps you can add it to the bug list before you leave it including what you tried in case its a symptom of some larger underlying problem. This list is archived, so there's a record. But I think this is a find bug, not an R bug, so it doesn't

Re: [R] Calling FING.EXE under RGui.EXE for windows.

2010-01-10 Thread Gabor Grothendieck
Perhaps you can add it to the bug list before you leave it including what you tried in case its a symptom of some larger underlying problem. On Sun, Jan 10, 2010 at 1:24 PM, Duncan Murdoch wrote: > I'm quitting on this one.  For the record, I took a look at a fairly old > version of the Tcl code

Re: [R] xmlToDataFrame#Help!!!#follow-up

2010-01-10 Thread Gabor Grothendieck
Try this: library(XML) doc <- xmlTreeParse("adodb.xml", useInternalNodes = TRUE) Lines <- xpathSApply(doc, "//z:row", function(x) do.call(paste, as.list(xmlAttrs(x DF <- read.table(textConnection(Lines), col.names = xpathSApply(doc, "//s:AttributeType", function(x) xmlAttrs(x)[

Re: [R] Calling FING.EXE under RGui.EXE for windows.

2010-01-10 Thread Duncan Murdoch
I'm quitting on this one. For the record, I took a look at a fairly old version of the Tcl code (from 8.4.13) that I had around from an old attempt to get it to work properly with MDI windows. There are a number of differences between their exec code and our system() code, but I couldn't find

[R] xmlToDataFrame#Help!!!#follow-up

2010-01-10 Thread Christian Ritter
Dieter Menne pointed out that the (small) xml attachment didn't make it. Here is an in-line version (see end of message). Let's hope it works this time. I'm struggling with interpreting XML files created by ADODB as data.frames and I'm looking for advice. Note: This xlm contains a result set

Re: [R] lme4 and function 'cholmod_start' not provided by package 'Matrix' / Ubuntu

2010-01-10 Thread Esmail
On 10-Jan-10 12:12, Dieter Menne wrote: Esmail Bonakdarian-4 wrote: Using Ubuntu 9.04 and R 2.8.1. For a project I need to use the Zelig package, which in turn wants to use the lme4 package. When trying to use Zelig and it tries to its required packages I get the following error message.

Re: [R] lme4 and function 'cholmod_start' not provided by package 'Matrix' / Ubuntu

2010-01-10 Thread Douglas Bates
As Dieter points out, this is likely a mismatch between the versions of the lme4 and the Matrix packages, which are very closely linked together. It appears that the version of the lme4 package is too old for the version of the Matrix package, which is hard to catch in the dependencies (lme4 depen

Re: [R] xmlToDataFrame#Help!!!

2010-01-10 Thread Duncan Temple Lang
Christian Ritter wrote: > I'm struggling with interpreting XML files created by ADODB as > data.frames and I'm looking for advice (see attached example file). You'll have to attach it (or give us a URL for it). Also, you should tell us what you have tried and how it failed. And of course, your s

Re: [R] xmlToDataFrame#Help!!!

2010-01-10 Thread Dieter Menne
Christian Ritter-4 wrote: > > I'm struggling with interpreting XML files created by ADODB as > data.frames and I'm looking for advice (see attached example file). > xmlToDataFrame is limited to "fairly flat" structures, so maybe your file is not flat enough. Try first to read in with xmlTree

Re: [R] lme4 and function 'cholmod_start' not provided by package 'Matrix' / Ubuntu

2010-01-10 Thread Dieter Menne
Esmail Bonakdarian-4 wrote: > > > Using Ubuntu 9.04 and R 2.8.1. > > For a project I need to use the Zelig package, which in turn wants to > use the lme4 package. When trying to use Zelig and it tries to its > required > packages I get the following error message. > > Error in dyn.load(file,

[R] xmlToDataFrame#Help!!!

2010-01-10 Thread Christian Ritter
I'm struggling with interpreting XML files created by ADODB as data.frames and I'm looking for advice (see attached example file). Note: This file contains a result set which comes from a rectangular data array. I've been trying to play with parameters to the xmlToDataFrame function in the XML

Re: [R] data frame names in sequence. please help!!!

2010-01-10 Thread Zoho
Thank you all. The 'list' works well, except makes a really big 'list', since my data is 'huge'. But solves the problem anyway. Appreciate a lot! Barry Rowlingson wrote: > > On Sun, Jan 10, 2010 at 7:16 AM, Berend Hasselman wrote: >> >> >> >> Zoho wrote: >>> >>> I've been stuck with this prob

Re: [R] parsing pdf files

2010-01-10 Thread Mark Wardle
[copied to list for posterity...] Sorry. I am completely wrong. I've been using itext to split, fill in forms and recombine PDF so assumed (wrongly) that text extraction was possible. In fact, reading the mailing lists is quite informative - clearly PDF is not designed for this. Try this http:

[R] lme4 and function 'cholmod_start' not provided by package 'Matrix' / Ubuntu

2010-01-10 Thread Esmail
Hello all, Using Ubuntu 9.04 and R 2.8.1. For a project I need to use the Zelig package, which in turn wants to use the lme4 package. When trying to use Zelig and it tries to its required packages I get the following error message. Error in dyn.load(file, DLLpath = DLLpath, ...) : function 'c

Re: [R] Calling FING.EXE under RGui.EXE for windows.

2010-01-10 Thread Henrik Bengtsson
> cat(file="foo.txt", "Hello world\n") > shell('find "Hello" < foo.txt') Hello world > shell('find "Hello" < foo.txt', intern=TRUE) [1] "Hello world" > shell('type foo.txt | find "Hello"') Hello world > shell('type foo.txt | find "Hello"', intern=TRUE) [1] "Hello world" A person at http://www.ex

Re: [R] Calling FING.EXE under RGui.EXE for windows.

2010-01-10 Thread Henrik Bengtsson
Forgot to say that when you use that findit.bat script, you get: Rgui.exe: > system("findit.bat") Errorlevel is 1, not found > shell("findit.bat") Errorlevel is 1, not found Rterm.exe: > shell("findit.bat") c:\config.sys Errorlevel is 0, found > system("findit.bat") c:\config.sys Errorlevel

Re: [R] Calling FING.EXE under RGui.EXE for windows.

2010-01-10 Thread Henrik Bengtsson
Article ID: 106203 - Last Review: November 1, 2006 - Revision: 3.1 FIND.EXE Does Not Return the Proper Errorlevel in Windows NT http://support.microsoft.com/kb/106203 /Henrik On Sun, Jan 10, 2010 at 5:39 AM, Duncan Murdoch wrote: > Gabor Grothendieck wrote: >> >> I noticed this does work, i.e. i

Re: [R] errors when installing packages (ubuntu)

2010-01-10 Thread Reinhard Furrer
All, as a temporary fix (until the new version is on CRAN), one can install spam version spam_0.20-0 available on http://user.math.uzh.ch/furrer/software/spam/ During the installation, a couple warnings appear, but on can ignore those... I'll post a new version soon. Best, Reinhard

[R] anova/graphs for _many_ variables

2010-01-10 Thread eldor ado
hello, i'm looking for an efficient way to run two-way-anovas and/or boxplots for all (200+) variable in a dataframe. are there a neat way to script this? lukas kohl __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEA

Re: [R] How to control spaces between axis, tick and label in xyplot or xYplot?

2010-01-10 Thread David Winsemius
On Jan 10, 2010, at 9:45 AM, willow1980 wrote: Dear R users, I encounter a problem regarding space control in xyplot. Basically, I want to control spaces between label, tick and axis. I remember there is a function called mgp in general plot. Is there a similar function for xyplot or xYp

[R] How to control number of significant digits (figures) in y-axis?

2010-01-10 Thread willow1980
Dear R users, I encounter a problem regarding number of significant digits on y-axis. Below is my basic code: myplotkid<-xyplot(expected_offspringnumber~afr|decade,groups=SES,data1, auto.key=list(space="right"),layout=c(9,1),xlab="",ylab="Offspring number", aspect="fill",scales=list(x=list(draw=F)

Re: [R] parsing pdf files

2010-01-10 Thread John Maindonald
Oblivious to the problems that Barry notes, I have used pdftotext, from Xpdf at http://www.foolabs.com/xpdf/download.html without apparent problem; this under MacOS X. For my purposes, I need to retain the CTRL/Fs that indicate page throws. Other converters that I have investigate seem not to ret

[R] How to control spaces between axis, tick and label in xyplot or xYplot?

2010-01-10 Thread willow1980
Dear R users, I encounter a problem regarding space control in xyplot. Basically, I want to control spaces between label, tick and axis. I remember there is a function called mgp in general plot. Is there a similar function for xyplot or xYplot? Below is my basic code: myplotkid<-xyplot(expected_o

Re: [R] Directory operations

2010-01-10 Thread anupam sinha
Hi Uwe, Thanks for your suggestion . Here's my code. I am confused as to how to initialize an empty list . Here I have used pairlist() *list.files()->org_xml_dirs for (i in org_xml_dirs) { setwd(file.path("/home/anupam/Research/Anupam_data/ORG_XML_FILES/",i)) org_xml<-list.files(

Re: [R] Calling FING.EXE under RGui.EXE for windows.

2010-01-10 Thread Duncan Murdoch
Gabor Grothendieck wrote: I noticed this does work, i.e. it displays the requested help info, in Rgui on my Vista system: library(tcltk) .Tcl("exec find /?") Yes, here too. It stores the output in a tclObj, so it's doing what we want to do. Anyone familiar with the Tcl source, and can sp

Re: [R] Calling FING.EXE under RGui.EXE for windows.

2010-01-10 Thread Gabor Grothendieck
I noticed this does work, i.e. it displays the requested help info, in Rgui on my Vista system: library(tcltk) .Tcl("exec find /?") On Sat, Jan 9, 2010 at 7:27 PM, Duncan Murdoch wrote: > On 09/01/2010 6:31 PM, Gabor Grothendieck wrote: >> >> That doesn't explain why this returns character(o) ev

Re: [R] data frame names in sequence

2010-01-10 Thread jim holtman
?get for (i in 1:20) { df_i <- get(paste('df_', i, sep='')) length(which(df_i[,7]==1)) ## } On Sat, Jan 9, 2010 at 7:57 PM, Zoho wrote: > > I've been stuck with this problem for a whole afternoon. It's silly but > totally pissed me off. I have a set of data frames with names in a > sequ

Re: [R] Plotting numeric values against non numeric items

2010-01-10 Thread Dennis Murphy
This isn't quite as sophisticated as Jim Lemon's solution (BTW, very nice!), but here's a way to get the graph (sans table) using ggplot2 and lattice: dissolve <- data.frame( Method = rep(c('No Stir', 'Stir'), each = 2), Type = rep(c('Cube', 'Granules'), 2), Time = c(

[R] Simple proportion barchart

2010-01-10 Thread WillP
Hi there, I am trying to create barcharts of the proportion of people who do art by covariate. I have data like this: artsex 0 1 1 0 0 1 0 0 1 1 ...all I want is to create a barchart of proportions who have 1 for art by sex. How do I do th

Re: [R] Simple proportion barchart

2010-01-10 Thread Dieter Menne
WillP wrote: > > I am trying to create barcharts of the proportion of people who do art by > covariate. > I have data like this: > artsex > 0 1 > 1 0 > 0 1 > 0 0 > 1 1 > > ...all I want is to create a barchart of proportions who have 1

Re: [R] parsing pdf files

2010-01-10 Thread Mark Wardle
If you can use a R <-> java interface, you could use itext to do this as long as the PDF is fairly sane. see http://itextpdf.com/ It is what pdftk uses. b/w Mark 2010/1/9 David Kane : > I have a pdf file that I would like to parse into R: > > http://www.williams.edu/Registrar/geninfo/faculty.p

Re: [R] data frame names in sequence. please help!!!

2010-01-10 Thread Barry Rowlingson
On Sun, Jan 10, 2010 at 7:16 AM, Berend Hasselman wrote: > > > > Zoho wrote: >> >> I've been stuck with this problem for a whole afternoon. It's silly but >> totally pissed me off. I have a set of data frames with names in a >> sequence: df_1, df_2, df_3, ..., df_20. Now I want to access each data

Re: [R] Plotting numeric values against non numeric items

2010-01-10 Thread Jim Lemon
On 01/10/2010 01:29 AM, lse1986 wrote: Hey Jim, Thanks for your reply! I tried what you said, i still kept getting errors. here's what i want my graph to look like: http://i.imagehost.org/0474/Untitled_5.jpg Oh, I see. AandC<-data.frame('Not Stir'=c(686.36,398.32),Stir=c(179.17,60.29))

[R] data frame names in sequence

2010-01-10 Thread Zoho
I've been stuck with this problem for a whole afternoon. It's silly but totally pissed me off. I have a set of data frames with names in a sequence: df_1, df_2, df_3, ..., df_20. Now I want to access each data frame (read or write) in a for loop, in a way something like this: for (i in 1:20) {