Re: [R] Cairo pdf canvas size

2011-01-05 Thread Peter Langfelder
On Wed, Jan 5, 2011 at 7:35 PM, Eduardo de Oliveira Horta wrote: > Something like this: > > u=seq(from=-pi, to=pi, length=1000) > f=sin(u) > Cairo("example.pdf", type="pdf",width=12,height=12,units="cm",dpi=300) > par(cex.axis=.6,col.axis="grey",ann=FALSE, lwd=.25,bty="n", las=1, tcl=-.2, > mgp=c(

Re: [R] Cairo pdf canvas size

2011-01-05 Thread David Winsemius
On Jan 5, 2011, at 10:35 PM, Eduardo de Oliveira Horta wrote: Something like this: u=seq(from=-pi, to=pi, length=1000) f=sin(u) Cairo("example.pdf", type="pdf",width=12,height=12,units="cm",dpi=300) par(cex.axis=.6,col.axis="grey",ann=FALSE, lwd=.25,bty="n", las=1, tcl=-.2, mgp=c(3,.5,0)) x

Re: [R] Cairo pdf canvas size

2011-01-05 Thread Eduardo de Oliveira Horta
Something like this: u=seq(from=-pi, to=pi, length=1000) f=sin(u) Cairo("example.pdf", type="pdf",width=12,height=12,units="cm",dpi=300) par(cex.axis=.6,col.axis="grey",ann=FALSE, lwd=.25,bty="n", las=1, tcl=-.2, mgp=c(3,.5,0)) xlim=c(-pi,pi) ylim=round(c(min(f),max(f))) plot(u,f,xlim,ylim,type="l

Re: [R] Cairo pdf canvas size

2011-01-05 Thread David Winsemius
On Jan 5, 2011, at 9:38 PM, Eduardo de Oliveira Horta wrote: Hello, I want to save a pdf plot using Cairo, but the canvas of the saved file seems too large when compared to the actual plotted area. Is there a way to control the relation between the canvas size and the size of actual plo

[R] Cairo pdf canvas size

2011-01-05 Thread Eduardo de Oliveira Horta
Hello, I want to save a pdf plot using Cairo, but the canvas of the saved file seems too large when compared to the actual plotted area. Is there a way to control the relation between the canvas size and the size of actual plotting area? Thanks in advance, and best regards, Eduardo Horta

Re: [R] memisc-Tables with robost standard errors

2011-01-05 Thread Achim Zeileis
On Thu, 6 Jan 2011, Jan Henckens wrote: Hello, I've got a question concerning the usage of robust standard errors in regression using lm() and exporting the summaries to LaTeX using the memisc-packages function mtable(): Is there any possibility to use robust errors which are obtained by vc

Re: [R] memisc-Tables with robost standard errors

2011-01-05 Thread Andrew Miles
I always use apsrtable in the apsrtable package, which allows you to specify a vcov matrix using the "se" option. The only trick is that you have to append it to your model object, something like this: fit=lm(y ~ x) fit$se=vcovHC(fit) apsrtable(fit, se="robust") Andrew Miles On Jan 5, 201

Re: [R] OT: Reducing pdf file size

2011-01-05 Thread Andrew Miles
I assume you mean PDFs generated by R. This topic has been addressed here: http://tolstoy.newcastle.edu.au/R/e2/help/07/05/17475.html I have always just output the graphics then used an external PDF program (like Preview on the Mac) to do changes in file type, size reductions, etc. Andrew

[R] memisc-Tables with robost standard errors

2011-01-05 Thread Jan Henckens
Hello, I've got a question concerning the usage of robust standard errors in regression using lm() and exporting the summaries to LaTeX using the memisc-packages function mtable(): Is there any possibility to use robust errors which are obtained by vcovHC() when generating the LateX-output b

Re: [R] pattern recognition with paths

2011-01-05 Thread Charles C. Berry
On Wed, 5 Jan 2011, Benjamin Polidore wrote: I'm trying to identify patterns among various "paths" like the following: http://i.imgur.com/bQPI3.png If I plot these, I can observe intuitively two different patterns: a front loaded (1 and 3) and a backloaded (2,4) progress path: http://i.imgur.

Re: [R] convert expressions to characters

2011-01-05 Thread Yihui Xie
I see. Thanks! Regards, Yihui -- Yihui Xie Phone: 515-294-2465 Web: http://yihui.name Department of Statistics, Iowa State University 2215 Snedecor Hall, Ames, IA On Wed, Jan 5, 2011 at 4:10 PM, Duncan Murdoch wrote: > On 11-01-05 4:47 PM, Yihui Xie wrote: >> Hi, >> >> Suppose I have >> >> x

Re: [R] Converting Fortran or C++ etc to R

2011-01-05 Thread Peter Langfelder
On Tue, Jan 4, 2011 at 4:02 PM, Murray Jorgensen wrote: > I'm going to try my hand at converting some Fortran programs to R. Does > anyone know of any good articles giving hints at such tasks? I will post a > selective summary of my gleanings. If the code uses functions/subroutines, keep in mind

Re: [R] Converting Fortran or C++ etc to R

2011-01-05 Thread David Duffy
Murray Jorgensen wrote: I'm going to try my hand at converting some Fortran programs to R. Does anyone know of any good articles giving hints at such tasks? I will post a selective summary of my gleanings. Presuming you don't mean .Fortran(), I have gone both ways. Aside from the obvious fac

[R] categorize a character column

2011-01-05 Thread Tan, Richard
Sorry I should have included the r code for the dataframes for ease of test: input <- rbind(data.frame(item="item 1.1: earnings item 1.2: w2 ", loc="shelf 1"), data.frame(item="item 1.3: deductions ", loc="drawer 1"), data.frame(item="item 1.1: earnings ", loc="shelf 2")) lst

[R] categorize a character column

2011-01-05 Thread Tan, Richard
Hi, I know I can do this with a for loop with strsplit and grep, but is there more efficient way? Given a data dataframe (input) and a category column (lst), > input item loc 1 item 1.1: earnings item 1.2: w2 shelf 1 2

Re: [R] pattern recognition with paths

2011-01-05 Thread David Winsemius
On Jan 5, 2011, at 5:24 PM, Benjamin Polidore wrote: I'm trying to identify patterns among various "paths" like the following: http://i.imgur.com/bQPI3.png If I plot these, I can observe intuitively two different patterns: a front loaded (1 and 3) and a backloaded (2,4) progress path: h

Re: [R] Reading large SAS dataset in R

2011-01-05 Thread Phil Spector
Santanu - If you have sas installed on your computer, you may find using the sas.get function of the Hmisc package useful. If the only message that read.ssd produced was "Sas failed", it would be difficult to figure out what went wrong. Usually the location of the log file, which would ex

Re: [R] Comparing fitting models

2011-01-05 Thread Greg Snow
The output with all three fits gives you 2 comparisons, fit1 vs. fit2 and fit2 vs. fit3. So using an alpha of 0.05, the 0.99 p-value is comparing model 2 (fit2) and model 3 (fit1) and testing the null that they fit equally well with the differences being due to random chance. The p-value is la

[R] pattern recognition with paths

2011-01-05 Thread Benjamin Polidore
I'm trying to identify patterns among various "paths" like the following: http://i.imgur.com/bQPI3.png If I plot these, I can observe intuitively two different patterns: a front loaded (1 and 3) and a backloaded (2,4) progress path: http://i.imgur.com/L5qwZ.png I have thousands of observations

Re: [R] Match numeric vector against rows in a matrix?

2011-01-05 Thread David Winsemius
On Jan 5, 2011, at 2:16 PM, Kevin Ummel wrote: Two posts in one day is not a good day...and this question seems like it should have an obvious answer: I have a matrix where rows are unique combinations of 1's and 0's: combs=as.matrix(expand.grid(c(0,1),c(0,1))) combs Var1 Var2 [1,]

Re: [R] convert expressions to characters

2011-01-05 Thread Duncan Murdoch
On 11-01-05 4:47 PM, Yihui Xie wrote: > Hi, > > Suppose I have > > x = parse(text = " > {y=50+50+50#'asfasf' > } > ") > > now x is an expression with some src attributes. > >> x > expression({y=50+50+50#'asfasf' > }) > attr(,"srcfile") > > attr(,"wholeSrcref") > > {y=50+50+50#'asfasf' > } > > My

Re: [R] convert expressions to characters

2011-01-05 Thread David Winsemius
On Jan 5, 2011, at 4:47 PM, Yihui Xie wrote: Hi, Suppose I have x = parse(text = " {y=50+50+50#'asfasf' } ") now x is an expression with some src attributes. x expression({y=50+50+50#'asfasf' }) attr(,"srcfile") attr(,"wholeSrcref") {y=50+50+50#'asfasf' } My question is, how can I get

Re: [R] Plotting colour-coded points

2011-01-05 Thread John Kane
With xx as your data.frame library(ggplot2) qplot(a, id, data=xx, color=b) --- On Wed, 1/5/11, ANJAN PURKAYASTHA wrote: > From: ANJAN PURKAYASTHA > Subject: [R] Plotting colour-coded points > To: r-help@r-project.org > Received: Wednesday, January 5, 2011, 2:00 PM > Hi, > I have a file of

[R] convert expressions to characters

2011-01-05 Thread Yihui Xie
Hi, Suppose I have x = parse(text = " {y=50+50+50#'asfasf' } ") now x is an expression with some src attributes. > x expression({y=50+50+50#'asfasf' }) attr(,"srcfile") attr(,"wholeSrcref") {y=50+50+50#'asfasf' } My question is, how can I get my string back (the string passed to parse() as t

Re: [R] Advice on obscuring unique IDs in R

2011-01-05 Thread Marc Schwartz
On Jan 5, 2011, at 3:19 PM, Anthony Staines wrote: > Dear colleagues, > > This may be a question with a really obvious answer, but I > can't find it. I have access to a large file with real > medical record identifiers (mixed strings of characters and > numbers) in it. These represent medical eve

Re: [R] Converting Fortran or C++ etc to R

2011-01-05 Thread Murray Jorgensen
Thanks Barry and thanks to others who applied off-list. I can see that I should have given more details about my motives for wanting to replace a Fortran program by an R one. At this stage I want to get something working in pure R because it is easier to fool around with and tweak with than Fo

Re: [R] Advice on obscuring unique IDs in R

2011-01-05 Thread Seeliger . Curt
Dr. Anthony wrote on 01/05/2011 01:19:49 PM: > This may be a question with a really obvious answer, but I > can't find it. I have access to a large file with real > medical record identifiers (mixed strings of characters and > numbers) in it. ... It's not that trivial of a question, or more organi

[R] Match numeric vector against rows in a matrix?

2011-01-05 Thread Kevin Ummel
Two posts in one day is not a good day...and this question seems like it should have an obvious answer: I have a matrix where rows are unique combinations of 1's and 0's: > combs=as.matrix(expand.grid(c(0,1),c(0,1))) > combs Var1 Var2 [1,]00 [2,]10 [3,]01 [4,]1

[R] Heat map in R

2011-01-05 Thread lraeb...@sfu.ca
Hello, I am trying to make a heatmap in R and am having some trouble. I am very new to the world of R, but have been told that what I am trying to do should be possible. I want to make a heat map that looks like a gene expression heatmap (see http://en.wikipedia.org/wiki/Heat_map). I have 43 sa

Re: [R] How to 'explode' a matrix

2011-01-05 Thread Kevin Ummel
Thanks, Henrique. The second option you suggested is about twice as fast as my original application. Much appreciated, Kevin On Jan 5, 2011, at 6:30 PM, Henrique Dallazuanna wrote: > Try this: > > apply(apply(m, 2, rep, each = 2), 1, rep, each = 2) > > or > > m[rep(seq(nrow(m)), each = 2),

[R] Reading large SAS dataset in R

2011-01-05 Thread Santanu Pramanik
Hi all, I have a large (approx. 1 GB) SAS dataset (test.sas7bdat) located in the server (“R:/” directory). I have SAS 9.1 installed in my PC and I can read the SAS dataset in SAS, under a windows environment, after assigning libname in "R:\" directory. Now I am trying to read the SAS dataset in

Re: [R] Comparing fitting models

2011-01-05 Thread Greg Snow
Just do anova(fit3, fit1) This compares those 2 models directly. -- Gregory (Greg) L. Snow Ph.D. Statistical Data Center Intermountain Healthcare greg.s...@imail.org 801.408.8111 > -Original Message- > From: r-help-boun...@r-project.org [mailto:r-help-boun...@r- > project.org] On Behal

[R] Advice on obscuring unique IDs in R

2011-01-05 Thread Anthony Staines
Dear colleagues, This may be a question with a really obvious answer, but I can't find it. I have access to a large file with real medical record identifiers (mixed strings of characters and numbers) in it. These represent medical events for many thousands of people. It's important to be able to l

Re: [R] speed up in R apply

2011-01-05 Thread David Winsemius
On Jan 5, 2011, at 2:40 PM, Douglas Bates wrote: On Wed, Jan 5, 2011 at 1:22 PM, David Winsemius > wrote: On Jan 5, 2011, at 10:03 AM, Young Cho wrote: Hi, I am doing some simulations and found a bottle neck in my R script. I made an example: a = matrix(rnorm(500),100,5) tt =

[R] Prediction error for Ordinary Kriging

2011-01-05 Thread pearl may dela cruz
Hi ALL, Can you please help me on how to determine the prediction error for ordinary kriging?Below are all the commands i used to generate the OK plot: rsa2 <- readShapeSpatial("residentialsa", CRS("+proj=tmerc +lat_0=39.66 +lon_0=-8.1319062 +k=1 +x_0=0 +y_0=0 +ellps=intl +

Re: [R] integration Sweave and TexMakerX

2011-01-05 Thread Duncan Murdoch
On 05/01/2011 12:04 PM, Sebastián Daza wrote: Hi, Does anyone know how to integrate texmakerx and sweave on Windows? I mean, to run .rnw files directly from texmakerx and get a pdf or dvi file. I don't know texmakerx, but the patchDVI package (on R-forge, see https://r-forge.r-project.org/R/

[R] OT: Reducing pdf file size

2011-01-05 Thread Kurt_Helf
Greetings Does anyone have any suggestions for reducing pdf file size, particularly pdfs containing photos, without sacrificing quality? Thanks for any tips in advance. Cheers Kurt *** Kurt Lewis Helf, Ph.D. Ecologist EEO Counselor

[R] plot(aModel) vs. influence.measures()

2011-01-05 Thread Schwab,Wilhelm K
A while back I asked about getting a list of points that R considers influential after fitting a linear model, and very quickly got a helpful pointer to influence.measures(). But "it has happened again." The trouble I am having is that points marked on plots are not flagged in the output from

[R] Nnet and AIC: selection of a parsimonious parameterisation

2011-01-05 Thread Ben Rhelp
Hi All, I am trying to use a neural network for my work, but I am not sure about my approach to select a parsimonious model. In R with nnet, the IAC has not been defined for a feed-forward neural network with a single hidden layer. Is this because it does not make sens mathematically in this cas

Re: [R] Assumptions for ANOVA: the right way to check the normality

2011-01-05 Thread Robert Baer
Someone suggested me that I don´t have to check the normality of the data, but the normality of the residuals I get after the fitting of the linear model. I really ask you to help me to understand this point as I don´t find enough material online where to solve it. Try the following: # using

Re: [R] speed up in R apply

2011-01-05 Thread Douglas Bates
On Wed, Jan 5, 2011 at 1:22 PM, David Winsemius wrote: > > On Jan 5, 2011, at 10:03 AM, Young Cho wrote: > >> Hi, >> >> I am doing some simulations and found a bottle neck in my R script. I made >> an example: >> >>> a = matrix(rnorm(500),100,5) >>> tt  = Sys.time(); sum(a[,1]*a[,2]*a[,3]*

Re: [R] R Commander - how to disable the alphabetical sorting of variable names?

2011-01-05 Thread John Fox
Dear Iurie Malai, How Rcmdr options are set is described in ?Commander, which is also accessible via the R Commander menus, "Help -> Commander help". You need options(Rcmdr=list(sort.names=FALSE)) which you can put in Rprofile.site. Best, John John Fox Senat

Re: [R] Plotting colour-coded points

2011-01-05 Thread David Winsemius
On Jan 5, 2011, at 2:00 PM, ANJAN PURKAYASTHA wrote: Hi, I have a file of the following type: idab 1 0.5 5 2 0.7 15 3 1.6 7 40.5 25 I would like to plot the data in column a on the y-axis and the corresponding data in column id o

Re: [R] OT: Reprinting of Bertin's Semiology of Graphics

2011-01-05 Thread Frank Harrell
This is a major publishing event for statistical graphics. I have long possessed Bertin's shorter book Graphics and Graphic Information Processing but Semiology is the one I've been waiting for. Thanks for the good news Michael! Frank - Frank Harrell Department of Biostatistics, Vanderbilt

Re: [R] speed up in R apply

2011-01-05 Thread David Winsemius
On Jan 5, 2011, at 10:03 AM, Young Cho wrote: Hi, I am doing some simulations and found a bottle neck in my R script. I made an example: a = matrix(rnorm(500),100,5) tt = Sys.time(); sum(a[,1]*a[,2]*a[,3]*a[,4]*a[,5]); Sys.time() - tt [1] -1291.026 Time difference of 0.2354031 s

Re: [R] Plotting colour-coded points

2011-01-05 Thread Jorge Ivan Velez
Hi Anjan, Try something along the lines of d$bb <- with(d, cut(b, c(0,9,19,29))) with(d, plot(a, id, col = bb, pch = 16, las = 1)) legend('topright', as.character(levels(d$bb)), col = 1:length(levels(d$bb)), ncol = 3, pch = 16) where 'd' is your original data.frame. HTH, Jorge On Wed, Jan 5,

[R] Plotting colour-coded points

2011-01-05 Thread ANJAN PURKAYASTHA
Hi, I have a file of the following type: idab 1 0.5 5 2 0.7 15 3 1.6 7 40.5 25 I would like to plot the data in column a on the y-axis and the corresponding data in column id on the x-axis, so plot(a~id). However I would like to col

Re: [R] vector of character with unequal width

2011-01-05 Thread Petr Savicky
On Wed, Jan 05, 2011 at 03:50:13PM +, jose Bartolomei wrote: [...] > > I was thinking to create a character vector of 0's 9-nchar(xx). > Then paste it to xx. > 9-nchar(xx) > [1] 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 > [38] 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8

Re: [R] vector of character with unequal width

2011-01-05 Thread Henrique Dallazuanna
Try this: formatC(c(1, 11, 111, ), flag = "0", width = 9) Or: sprintf("%09d", c(1, 11, 111)) On Wed, Jan 5, 2011 at 1:50 PM, jose Bartolomei wrote: > > > > Dear R users, > > > The best in this new year 2011. > > > I am dealing with a character vector (xx) whose nchar are not the same. > >

Re: [R] Simulation - Natrual Selection

2011-01-05 Thread Ben Ward
On 05/01/2011 17:40, Bert Gunter wrote: My hypothesis was specified before I did my experiment. Whilst far from perfect, I've tried to do the best I can to assess rise in resistance, without going into genetics as it's not possible. (Although may be at the next institution I've applied for MSc).

Re: [R] How to 'explode' a matrix

2011-01-05 Thread Jorge Ivan Velez
Hi Kevin, Take a look at ?kronecker HTH, Jorge On Wed, Jan 5, 2011 at 7:03 AM, Kevin Ummel <> wrote: > Hi everyone, > > I'm looking for a way to 'explode' a matrix like this: > > > matrix(1:4,2,2) > [,1] [,2] > [1,]13 > [2,]24 > > into a matrix like this: > > > matrix(c(1,

Re: [R] real time R

2011-01-05 Thread Barry Rowlingson
On Wed, Jan 5, 2011 at 4:10 PM, Marcelo Barbudas wrote: > Hi, > > We're using R in an application where asking for a probability of an > event takes about 130ms. > > What could we do to take that down to 30ms-40ms? The query code uses > randomforest, knn. > That's a fairly vague question So

Re: [R] multipanel plots

2011-01-05 Thread Uwe Ligges
On 05.01.2011 06:16, smriti Sebastian wrote: hi, i have attached a doc file. Maybe, but it cannot make it through the list. Is this graph can be plotted using R?Plz help We do not know. Make it available on some webserver and refer to it with an URL. Uwe Ligges regards, smriti __

Re: [R] How to 'explode' a matrix

2011-01-05 Thread Ben Bolker
Kevin Ummel gmail.com> writes: > I'm looking for a way to 'explode' a matrix like this: > > > matrix(1:4,2,2) > [,1] [,2] > [1,]13 > [2,]24 > This is the Kronecker product of your matrix with the matrix (1 1 ; 1 1) m <- matrix(1:4,2,2) kronecker(m,matrix(1,2,2)) ch

Re: [R] real time R

2011-01-05 Thread Uwe Ligges
On 05.01.2011 17:10, Marcelo Barbudas wrote: Hi, We're using R in an application where asking for a probability of an event takes about 130ms. > What could we do to take that down to 30ms-40ms? The query code uses randomforest, knn. Use a machine that is 4 times faster? Otherwise: Use a

Re: [R] How to 'explode' a matrix

2011-01-05 Thread Henrique Dallazuanna
Try this: apply(apply(m, 2, rep, each = 2), 1, rep, each = 2) or m[rep(seq(nrow(m)), each = 2), rep(seq(ncol(m)), each = 2)] On Wed, Jan 5, 2011 at 10:03 AM, Kevin Ummel wrote: > Hi everyone, > > I'm looking for a way to 'explode' a matrix like this: > > > matrix(1:4,2,2) > [,1] [,2] > [1

Re: [R] Stop and call objects

2011-01-05 Thread William Dunlap
> -Original Message- > From: r-help-boun...@r-project.org > [mailto:r-help-boun...@r-project.org] On Behalf Of Henrique > Dallazuanna > Sent: Wednesday, January 05, 2011 9:26 AM > To: Sebastien Bihorel > Cc: R-help > Subject: Re: [R] Stop and call objects > > Try this: > > f <- function

[R] Comparing fitting models

2011-01-05 Thread Frodo Jedi
Dear all, I have 3 models (from simple to complex) and I want to compare them in order to see if they fit equally well or not. From the R prompt I am not able to see where I can get this information. Let´s do an example: fit1<- lm(response ~ stimulus + condition + stimulus:condition, data=scrd)

Re: [R] Cost-benefit/value for money analysis

2011-01-05 Thread Graham Smith
Liviu Try this: > > require(sos) > > findFn('cost benefit') > found 12 matches > Thanks, I wasn't aware of sos, however, following up the hits hasn't moved me any further forward, except to demonstrate that such a function I want doesn't exist. But I will try some other search options. Graham

[R] vector of character with unequal width

2011-01-05 Thread jose Bartolomei
Dear R users, The best in this new year 2011. I am dealing with a character vector (xx) whose nchar are not the same. Ex. nchar(xx) [1] 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 [38] 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 3 3 3 3 3 4 4 4 4 4 4 4

[R] real time R

2011-01-05 Thread Marcelo Barbudas
Hi, We're using R in an application where asking for a probability of an event takes about 130ms. What could we do to take that down to 30ms-40ms? The query code uses randomforest, knn. -- M. __ R-help@r-project.org mailing list https://stat.ethz.ch/

Re: [R] unique limited to 536870912

2011-01-05 Thread Indrajeet Singh
Hi I am using the 64 bit version. To check that i went in the bin folder and executed "file r ". It gave the following output ELF 64-bit LSB executable, AMD x86-64, version 1 (SYSV), for GNU/Linux 2.6.9, dynamically linked (uses shared libs), for GNU/Linux 2.6.9, not stripped The error i got when

[R] How to 'explode' a matrix

2011-01-05 Thread Kevin Ummel
Hi everyone, I'm looking for a way to 'explode' a matrix like this: > matrix(1:4,2,2) [,1] [,2] [1,]13 [2,]24 into a matrix like this: > matrix(c(1,1,2,2,1,1,2,2,3,3,4,4,3,3,4,4),4,4) [,1] [,2] [,3] [,4] [1,]1133 [2,]1133 [3,]22

[R] speed up in R apply

2011-01-05 Thread Young Cho
Hi, I am doing some simulations and found a bottle neck in my R script. I made an example: > a = matrix(rnorm(500),100,5) > tt = Sys.time(); sum(a[,1]*a[,2]*a[,3]*a[,4]*a[,5]); Sys.time() - tt [1] -1291.026 Time difference of 0.2354031 secs > > tt = Sys.time(); sum(apply(a,1,prod)); Sys

Re: [R] looking for the RMySQL package for R 2.12.0 under XP

2011-01-05 Thread PtitBleu
Hello David, As I had no time to try to compile the RMySQL package, I finally followed your advice and moved to RODBC. The decision to modify my scripts was taken after I discovered the function odbcDriverConnect which allow to directly connect to database (like RMySQL) without declaring the data

[R] loop variable names as function arguments

2011-01-05 Thread P Wilson
Dear all, is there a way to loop the rp.doublebutton function in the rpanel package? The difficulty I'm having lies with the variable name argument. library(rpanel) if (interactive()) { draw <- function(panel) { plot(unlist(panel$V),ylim=0:1) panel } panel <- rp.control(V=as.l

Re: [R] update.views("Spatial") does not seem to be able to find RPyGeo package

2011-01-05 Thread Roger Bivand
The package is stated only to run under Windows (see the SystemRequirements field on its CRAN page), and you are on Linux - does this explain anything? Maybe ask the package maintainer? Roger Linder, Eric wrote: > > I have this problem with loading RPyGeo package when using update.views. > Ho

[R] R Commander - how to disable the alphabetical sorting of variable names?

2011-01-05 Thread Iurie Malai
I try to disable alphabetical sorting of the variable names but I fail, R Commander does not store any changes made in the "Commander Options" menu / window. I tried to insert "options(sort.names = FALSE)" in Rprofile.site and .Rprofile config files but without success. Does anyone know the solut

[R] Assumptions for ANOVA: the right way to check the normality

2011-01-05 Thread Frodo Jedi
Dear all, I would like to know which is the right way to check the normality assumption for performing ANOVA. How do you check normality for the following example? I did an experiment where people had to evaluate on a 7 point scale, the degree of realism of some stimuli presented in 2 condit

Re: [R] t-test or ANOVA...who wins? Help please!

2011-01-05 Thread Frodo Jedi
Dear Tal Galili, thanks a lot for your answer! I agree with you, the t-test is comparing 2 conditions at one level of stimulus, while the ANOVA table is testing the significance of the interaction between condition and stimulsthe two tests are testing two different things. But still I don´t

[R] Forecasting with STL

2011-01-05 Thread felipe araujo
Dear list,   We have been using STL for seasonal decomposition, and would like to use the trend and seasonal component to forecast n steps ahead.   There is no function called predict.stl, and inside an stl object there is no loess model to be predicted either.   Our solution is to apply loe

Re: [R] randomForest speed improvements

2011-01-05 Thread Liaw, Andy
From: Liaw, Andy > > Note that that isn't exactly what I recommended. If you look at the > example in the help page for combine(), you'll see that it is > combining > RF objects trained on the same data; i.e., instead of having > one RF with > 500 trees, you can combine five RFs trained on the

Re: [R] Navigating web pages using R

2011-01-05 Thread steven mosher
Hmm, Rcurl may be able to help you. Not sure I have not played with the "query" abilities. On Tue, Jan 4, 2011 at 10:54 AM, Erik Gregory wrote: > R-Help, > > I'm trying to obtain some data from a webpage which masks the URL from the > user, > so an explicit URL will not work. For example, when

[R] Fwd: Re: Simulation - Natrual Selection

2011-01-05 Thread Ben Ward
Original Message Subject:Re: [R] Simulation - Natrual Selection Date: Wed, 05 Jan 2011 17:24:05 + From: Ben Ward To: Bert Gunter CC: Mike Marchywka On 05/01/2011 17:08, Bert Gunter wrote: > Couple of brief comments inline below. -- Bert > > On Wed

Re: [R] get() within a command, specifically lmer

2011-01-05 Thread Greg Snow
Formula syntax is different from regular syntax, it is "quoted" and not evaluated in the same way as regular commands (otherwise operations like '+' and '-' would do very different things). For what you are trying to do, I would suggest creating the formula as a string using paste or sprintf, t

Re: [R] Stop and call objects

2011-01-05 Thread Henrique Dallazuanna
Try this: f <- function(x) tryCatch(sum(x),error=function(e)sprintf("Error in %s: %s", deparse(sys.call(1)), e$message)) f('a') On Wed, Jan 5, 2011 at 12:23 PM, Sebastien Bihorel < sebastien.biho...@cognigencorp.com> wrote: > Dear R-users, > > Let's consider the following snippet: > > f <-

[R] integration Sweave and TexMakerX

2011-01-05 Thread Sebastián Daza
Hi, Does anyone know how to integrate texmakerx and sweave on Windows? I mean, to run .rnw files directly from texmakerx and get a pdf or dvi file. Thank you in advance, -- Sebastián Daza sebastian.d...@gmail.com __ R-help@r-project.org mailing li

Re: [R] Simulation - Natrual Selection

2011-01-05 Thread Ben Ward
On 05/01/2011 16:37, Mike Marchywka wrote: Date: Wed, 5 Jan 2011 15:48:46 + From: benjamin.w...@bathspa.org To: r-help@r-project.org Subject: [R] Simulation - Natrual Selection Hi, I've been modelling some data over the past few days, of my work, repeatedly challenging microbes to a ce

Re: [R] Cost-benefit/value for money analysis

2011-01-05 Thread Liviu Andronic
On Wed, Jan 5, 2011 at 12:29 PM, Graham Smith wrote: >> maximal choices would break the budget. This sounds like a homework problem >> and I don't see any student effort yet. Search terms include: "decision >> analysis" , "cost-benefit analysis", or "utility theory". >> > > Hopefully,  my response

Re: [R] Simulation - Natrual Selection

2011-01-05 Thread Mike Marchywka
> Date: Wed, 5 Jan 2011 15:48:46 + > From: benjamin.w...@bathspa.org > To: r-help@r-project.org > Subject: [R] Simulation - Natrual Selection > > Hi, > > I've been modelling some data over the past few days, of my work, > repeatedly challenging microbes to a certain concentration of cleane

Re: [R] R(D) Com under R1070

2011-01-05 Thread Uwe Ligges
Can you please quote what you are referring to? The subject seems to refer to an R version R-1.7.0 which is for almost a decade outdated. Uwe Ligges On 05.01.2011 08:31, Henri Leblond wrote: I get the same trouble Please finally did you succeed fixing this trouble ? Henri __

[R] OT: Reprinting of Bertin's Semiology of Graphics

2011-01-05 Thread Michael Friendly
Aficionados of graphics may be interested to know that the English translation (1984) of Jacques Bertin's Semiology of Graphics has been reprinted by ESRI. http://www.amazon.com/Semiology-Graphics-Diagrams-Networks-Maps/dp/0299090604 new edition: http://www.amazon.com/Semiology-Graphics-Diagrams

Re: [R] R not recognized in command line

2011-01-05 Thread Joshua Wiley
On Wed, Jan 5, 2011 at 7:41 AM, Duncan Murdoch wrote: > Editing the PATH is probably the best approach, but a lot of people get it > wrong because of misunderstanding how it works: > >  -  If you change PATH in one process the changes won't propagate anywhere > else, and will be lost as soon as yo

Re: [R] R not recognized in command line

2011-01-05 Thread Gabor Grothendieck
On Wed, Jan 5, 2011 at 10:41 AM, Duncan Murdoch wrote: > On 11-01-05 8:51 AM, Joshua Wiley wrote: >> >> Hi Aaditya, >> >> I assume you are running some variant of Windows and by the "prompt in >> DOS" you are using cmd.exe. >> >> Perhaps you are already, but from your examples it looks like either

[R] rShowMessage "Fatal error: unable to open the base package

2011-01-05 Thread ying zhang
Hi All, As you may know I am trying connect R with java by RJava, now I run the examples, I got this error rShowMessage "Fatal error: unable to open the base package I am using 64bits windows 7 and eclipse. Any suggestions? Many thanks Ying [[alternative HTML versi

[R] Simulation - Natrual Selection

2011-01-05 Thread Ben Ward
Hi, I've been modelling some data over the past few days, of my work, repeatedly challenging microbes to a certain concentration of cleaner, until the required concentration to inhibit or kill them increaces, at which point they are challenged to a slightly higher concentration each day. I'm

Re: [R] R not recognized in command line

2011-01-05 Thread Duncan Murdoch
On 11-01-05 8:51 AM, Joshua Wiley wrote: Hi Aaditya, I assume you are running some variant of Windows and by the "prompt in DOS" you are using cmd.exe. Perhaps you are already, but from your examples it looks like either A) you are not in the same directory as R or B) are not adding the path to

[R] get() within a command, specifically lmer

2011-01-05 Thread Patrick McKann
Hello all. Why doesn't this work? d=data.frame(y=rpois(10,1),x=rnorm(10),z=rnorm(10),grp=rep(c('a','b'),each=5)) library(lme4) model=lmer(y~x+z+(1|grp),family=poisson,data=d) update(model,~.-z)###works, removes z var='z' update(model,~.-get(var))##doesn't remove z update(model,~. -get(var,pos=d))

Re: [R] randomForest speed improvements

2011-01-05 Thread Liaw, Andy
Note that that isn't exactly what I recommended. If you look at the example in the help page for combine(), you'll see that it is combining RF objects trained on the same data; i.e., instead of having one RF with 500 trees, you can combine five RFs trained on the same data with 100 trees each into

Re: [R] dotchart for matrix data

2011-01-05 Thread David Winsemius
On Jan 5, 2011, at 8:11 AM, e-letter wrote: Readers, The following commands were applied, to create a dot chart with black dots and blue squares for data: library(lattice) testdot category values 1b 44 2c 51 3d 65 4a 10 5b 64 6

Re: [R] R command execution from shell

2011-01-05 Thread Sebastien Bihorel
Thank you for this alternative. Both seem to work on my systems. Sebastien Prof Brian Ripley wrote: On Tue, 4 Jan 2011, Duncan Murdoch wrote: On 04/01/2011 3:21 PM, Sebastien Bihorel wrote: Dear R-users, Is there a way I can ask R to execute the "write("hello world",file="hello.txt")" comma

Re: [R] Adding lines in ggplot2

2011-01-05 Thread Eduardo de Oliveira Horta
I thank you all for the insightful answers. I'm quite a rookie in R and have built a code that didn't take data frames into account. But I suppose I'm now convinced that they're actually a practical structure for organizing the data... so I'll adhere to the Data Frame Club soon enough. Best regard

[R] Stop and call objects

2011-01-05 Thread Sebastien Bihorel
Dear R-users, Let's consider the following snippet: f <- function(x) tryCatch(sum(x),error=function(e) stop(e)) f('a') As expected, the last call returns an error message: Error in sum(x) : invalid 'type' (character) of argument My questions are the following: 1- can I easily ask the stop f

Re: [R] packagename:::functionname vs. importFrom

2011-01-05 Thread Frank Harrell
Thanks very much Luke for clarifying. Frank - Frank Harrell Department of Biostatistics, Vanderbilt University -- View this message in context: http://r.789695.n4.nabble.com/packagename-functionname-vs-importFrom-tp3172684p3175567.html Sent from the R help mailing list archive at Nabble.com

Re: [R] R not recognized in command line

2011-01-05 Thread Joshua Wiley
Hi Aaditya, I assume you are running some variant of Windows and by the "prompt in DOS" you are using cmd.exe. Perhaps you are already, but from your examples it looks like either A) you are not in the same directory as R or B) are not adding the path to R in the command. For example, on Windows

Re: [R] What are the necessary Oracle software to install and run ROracle ?

2011-01-05 Thread Marc Schwartz
On Jan 5, 2011, at 2:55 AM, thomas.car...@bnpparibas.com wrote: > Hello, > > I am running Linux, I have downloaded > > instantclient-basiclite-linux32-11.2.0.2.0.zip > instantclient-sqlplus-linux32-11.2.0.2.0.zip > instantclient-sdk-linux32-11.2.0.2.0.zip > instantclient-precomp-linux32-11.2.0.

Re: [R] How to save graphs out of ACF ?

2011-01-05 Thread Ben Bolker
bafin.de> writes: > > Hi, > > I want to save the autocorrelation plots resulting out of ACF (acf(ts)), not just by using the "Save as" > command in the R Gui but using some sort of code, which allows me to chose the format and the path. > Thank you, > > Mihai for example: a <- acf(runif(10

Re: [R] unique limited to 536870912

2011-01-05 Thread jim holtman
Could it be that you are running on a 32-bit version of R? 536870912 * 4 = 2GB if those were integers which would use up all of memory. You never did show what your error message was or what system you were using. On Wed, Jan 5, 2011 at 12:08 AM, Indrajeet Singh wrote: > Hi > I am using R with i

Re: [R] dotchart for matrix data

2011-01-05 Thread e-letter
Readers, The following commands were applied, to create a dot chart with black dots and blue squares for data: > library(lattice) > testdot category values 1b 44 2c 51 3d 65 4a 10 5b 64 6c 71 7d 49 8a

Re: [R] Adding lines in ggplot2

2011-01-05 Thread Dennis Murphy
It was gently suggested to me in a private message that to achieve *complete* control over the inputs and outputs in R graphics one should be using grid graphics. I concur with that suggestion and wish to amend my previous statement accordingly. With kindest thanks, Dennis On Wed, Jan 5, 2011 at

  1   2   >