[R] displaying percentage in bar plot

2009-04-23 Thread Nattu
Hi, I have a query regarding barplot I have a following data AIS LEvel 1 23 body regionA 10 15 20 B 15 25 15 Now I want to plot a barplot and in each bar (c

[R] issue building my own package... moving from Apple OS to Windows

2009-04-23 Thread Daryl Morris
Hello, I have written my own very simple package. On an Apple, I was able to run through the "R CMD build" and "R CMD check" successfully. I have also installed the package, and successfully loaded the library on my Apple. This package is written entirely in R and requires no compilation. I

[R] error message in plm package

2009-04-23 Thread Helen Chen
Dear R help, I use the package plm the function plm() to analyse a panel data and estimate a fixeffect model. I use the code as follow : fe <- plm(y~x+z, data, model = "within") But I had a error message Error in model.frame.default(form, ...) : object is not a matrix I

[R] Box-counting dimension and package 'fdim'

2009-04-23 Thread Remko Duursma
Dear R-helpers, I am looking for an implementation of the box-counting algorithm to estimate the box dimension of a cloud of points in 3D (aka fractal dimension, or similarity dimension). The package 'fdim' might be doing this, but the documentation is awful and I don't understand what is what t

Re: [R] Generalized 2D list/array/whatever?

2009-04-23 Thread David Winsemius
On Apr 24, 2009, at 12:16 AM, David Winsemius wrote: I cannot figure out what you are trying to do, but I'm reasonably sure that the construction: xxx[[index,index2]] ... is going to fail. If you want to create a two dimensional structure, most people would use either a dataframe or a ma

Re: [R] Generalized 2D list/array/whatever?

2009-04-23 Thread David Winsemius
I cannot figure out what you are trying to do, but I'm reasonably sure that the construction: xxx[[index,index2]] ... is going to fail. If you want to create a two dimensional structure, most people would use either a dataframe or a matrix rather than a list, although lists have the advanta

Re: [R] deleting rows provisionally

2009-04-23 Thread Ben Bolker
onyourmark wrote: > > I have an object. I think it is a matrix, called 'answer2' > str(answer2) > int [1:1537, 1:2] 1 399 653 2 3 600 4 5 271 870 ... > - attr(*, "dimnames")=List of 2 > ..$ : chr [1:1537] "a4.1" "hirschsprung.399" "peritoneal.653" > "abdomen.2" ... > ..$ : chr [1:2] "row

[R] deleting rows provisionally

2009-04-23 Thread onyourmark
I have an object. I think it is a matrix, called 'answer2' str(answer2) int [1:1537, 1:2] 1 399 653 2 3 600 4 5 271 870 ... - attr(*, "dimnames")=List of 2 ..$ : chr [1:1537] "a4.1" "hirschsprung.399" "peritoneal.653" "abdomen.2" ... ..$ : chr [1:2] "row" "col" I want to delete rows that

Re: [R] Error building package: LaTeX error when creating PDF version

2009-04-23 Thread Peter Dunn
Duncan suggested R CMD check was not finding pdflatex, because there is no .log file in the same directory as the .tex file. However, the first line of output from R CMD check says: > * checking for working pdflatex ... OK Indeed: pdu...@pdunnubuntu:~/DSdata/GLMsData.Rchecks$ R CMD pdflatex T

Re: [R] Generalized 2D list/array/whatever?

2009-04-23 Thread Toby
I must be going about my idea really backwards. I have functions like so: Nasa_PART_Bounds <- rbind(Nasa_PART_Bounds, c("Nasa_PART_B1")) Nasa_PART_B1 <- function(l,u) { l[["Nasa_PART_B1", "CYCLOMATIC_COMPLEXITY"]] <- 8 u[["Nasa_PART_B1", "CYCLOMATIC_COMPLEXITY"]] <- 60 l[[

Re: [R] joining multiple lists

2009-04-23 Thread David Winsemius
I'm not sure that merge will do what you originally requested. At least look at rbind before deciding to go with merge. On Apr 23, 2009, at 9:30 PM, Daniel Bradley wrote: Merge()! Thanks! On Fri, Apr 24, 2009 at 11:26 AM, Daniel Bradley >wrote: Hi! I'm reading and cleaning data from mu

Re: [R] Help with for/if loop

2009-04-23 Thread David Winsemius
On Apr 23, 2009, at 8:07 PM, Giggles_Fairy wrote: I have a set of data that includes various data columns. One if the survival time and another if a continuous variable of ages. I want to put the ages into intervals so that I can then perform the Kalpan Meier test. I am trying to use the

Re: [R] Help with for/if loop

2009-04-23 Thread andrew
or perhaps agec <- 0*age age[age<=46] <- 1 age[age>46 & age<=58 <- 2 age[age>58] <- 3 or perhaps a one liner cut(x = age, breaks= c(0,46, 58,Inf), labels = c(1,2,3)) On Apr 24, 11:24 am, Jorge Ivan Velez wrote: > Dear Hollie, > ifelse() is one alternative in this particular case: > > # Some

Re: [R] Generalized 2D list/array/whatever?

2009-04-23 Thread Gabor Grothendieck
Matrix made from a list: m <- list(sin, 1:3, letters[1:3], expression(a+b)) dim(m) <- c(2, 2) dimnames(m) <- list(letters[1:2], LETTERS[1:2]) class(m) # matrix or M <- structure(list(sin, 1:3, letters[1:3], expression(a+b)), .Dim = c(2, 2), .Dimnames = list(c("a", "b"), c("A", "B"))) class(M)

[R] Generalized 2D list/array/whatever?

2009-04-23 Thread Toby
I'm trying to figure out how I can get a generalized 2D list/array/matrix/whatever working. Seems I can't figure out how to make the variables the right type. I always seem to get some sort of error... out of bounds, wrong type, wrong dim, etc. Very confused... :) x[["some label", "some other in

Re: [R] joining multiple lists

2009-04-23 Thread Daniel Bradley
Merge()! Thanks! On Fri, Apr 24, 2009 at 11:26 AM, Daniel Bradley wrote: > Hi! > > I'm reading and cleaning data from multiple excel spreadsheets. All the > data has the same column names and the natural next step is to join the > lists of data together to make one list for reporting purposes

[R] joining multiple lists

2009-04-23 Thread Daniel Bradley
Hi! I'm reading and cleaning data from multiple excel spreadsheets. All the data has the same column names and the natural next step is to join the lists of data together to make one list for reporting purposes. I had thought that c(file1data, file2data) would do the trick but that seems to appe

Re: [R] Help with for/if loop

2009-04-23 Thread Jorge Ivan Velez
Dear Hollie, ifelse() is one alternative in this particular case: # Some data age<- c(46,47,43,46,47,59,50,54,59,60) ifelse(age<=46, 1, ifelse( age>46 & age<=58 , 2, 3) ) [1] 1 2 1 1 2 3 2 2 3 3 See ?ifelse for more details. HTH, Jorge On Thu, Apr 23, 2009 at 8:07 PM, Giggles_Fairy

[R] Can't install package "glmnet"

2009-04-23 Thread Liang Zhang
Hi, I was trying to install package glmnet in R, but failed and it show such messages: * Installing *source* package glmnet ... This package has only been tested with gfortran. So some checks are needed. R_HOME is /home/username/R/R-2.9.0 Attempting to determine R_ARCH... R_ARCH is Attempting

[R] Help with for/if loop

2009-04-23 Thread Giggles_Fairy
I have a set of data that includes various data columns. One if the survival time and another if a continuous variable of ages. I want to put the ages into intervals so that I can then perform the Kalpan Meier test. I am trying to use the following code to build a column with the age group numbers

Re: [R] Error building package: LaTeX error when creating PDF version

2009-04-23 Thread Duncan Murdoch
On 23/04/2009 8:24 PM, Peter Dunn wrote: Hi all I am trying to build an R package, which I have successfully done many times before, but have an error I cannot trace. I hope someone can help me. Here's is some edited output (full output below if it is useful): pdu...@pdunnubuntu:~/DSdata$

[R] Error building package: LaTeX error when creating PDF version

2009-04-23 Thread Peter Dunn
Hi all I am trying to build an R package, which I have successfully done many times before, but have an error I cannot trace. I hope someone can help me. Here's is some edited output (full output below if it is useful): pdu...@pdunnubuntu:~/DSdata$ R CMD build GLMsData * checking for file '

Re: [R] conditional grouping of variables: ave or tapply or by or???

2009-04-23 Thread Gabor Grothendieck
Try this: > df$v4 <- ave(1:nrow(df), df$v1, FUN = function(i) with(df[i,], v2[!v3])) > df v1 v2 v3 v4 1 10 7 0 7 2 10 5 1 7 3 10 7 2 7 4 11 9 0 9 5 11 7 2 9 > # If as is the case here that 0 is always the first in each v1 group > # then it can be simplified further to: > df$v4 <

Re: [R] conditional grouping of variables: ave or tapply or by or???

2009-04-23 Thread hadley wickham
On Thu, Apr 23, 2009 at 5:11 PM, ozan bakis wrote: > Dear R Users, > I have the following data frame: > > v1 <- c(rep(10,3),rep(11,2)) > v2 <- sample(5:10, 5, replace = T) > v3 <- c(0,1,2,0,2) > df <- data.frame(v1,v2,v3) >> df >  v1 v2 v3 > 1 10  9  0 > 2 10  5  1 > 3 10  6  2 > 4 11  7  0 > 5 11

Re: [R] suppress output from step function

2009-04-23 Thread Jorge Ivan Velez
Dear Pierre, See argument trace in ?step. Setting up trace=FALSE in your code should hide the steps: step(linear_model, trace=FALSE) HTH, Jorge On Thu, Apr 23, 2009 at 6:34 PM, Pierre Moffard wrote: > Dear all, > > Is there a way of using the step function on a linear model such that all >

[R] suppress output from step function

2009-04-23 Thread Pierre Moffard
Dear all, Is there a way of using the step function on a linear model such that all the steps are not printed out? Say I have a matrix X of 50 explanatory variables and a binary response Y. linear_model<-glm(Y~X, data=my_data, family="binomial") SS<-step(linear_model) This last step produces a

Re: [R] Parenthesis around date/time using chron?

2009-04-23 Thread Gabor Grothendieck
Try this: > x <- as.chron(Sys.time()) > format(x, enclosed = c("", "")) [1] "04/23/09 22:26:23" On Thu, Apr 23, 2009 at 6:03 PM, Kenneth Takagi wrote: > Hi, > > > > I've been using the chron package to convert excel time into > month/day/year and h:m:s formats, specifically for use as axis labe

Re: [R] Stuck using constrOptim

2009-04-23 Thread Ravi Varadhan
My bad. It skipped my mind that constrOptim requires that you specify the gradient function for using BFGS. I have writtten a constrOPtim function that computes the gradient numerically and also can incorporate non-linear inequality constraints. I will send it to you, if you are interested. Rav

[R] conditional grouping of variables: ave or tapply or by or???

2009-04-23 Thread ozan bakis
Dear R Users, I have the following data frame: v1 <- c(rep(10,3),rep(11,2)) v2 <- sample(5:10, 5, replace = T) v3 <- c(0,1,2,0,2) df <- data.frame(v1,v2,v3) > df v1 v2 v3 1 10 9 0 2 10 5 1 3 10 6 2 4 11 7 0 5 11 5 2 I want to add a new column v4 such that its values are equal to the v

Re: [R] My surprising experience in trying out REvolution's R

2009-04-23 Thread David M Smith
We've taken a look at this in a bit more detail; it's a very interesting example. Although the code uses several functions that exploit the parallel processing in REvolution R (notably %*% and chol), this was one of those situations where the overheads of threading pretty much balanced any perform

[R] Parenthesis around date/time using chron?

2009-04-23 Thread Kenneth Takagi
Hi, I've been using the chron package to convert excel time into month/day/year and h:m:s formats, specifically for use as axis labels. I've come across something I don't quite understand. ### Here are some excel times: dat = c(39083, 39083.00694, 39083.01389, 39083.02083, 39083.02778, 3

[R] Interpreting the results of Friedman test

2009-04-23 Thread Doerte
Hello, I have problems interpreting the results of a Friedman test. It seems to me that the p-value resulting from a Friedman test and with it the "significance" has to be interpreted in another way than the p-value resulting from e.g. ANOVA? Let me describe the problem with some detail: I'm test

Re: [R] Stuck using constrOptim

2009-04-23 Thread dre968
so i set gr=Null: > constrOptim(p0,minsquare,Y=Y,Z=Z,NULL,gr=NULL,ui=A,ci=B,method="BFGS") and i recieved the following error: Error in optim(theta.old, fun, gradient, control = control, method = method, : objective function in optim evaluates to length 0 not 1 -- View this message in context

Re: [R] R 2.8.1 change user input color of R scrpt too

2009-04-23 Thread Greg Snow
The short answer is to upgrade to R version 2.9.0 where you have more control over the colors in the different types of windows. -- Gregory (Greg) L. Snow Ph.D. Statistical Data Center Intermountain Healthcare greg.s...@imail.org 801.408.8111 > -Original Message- > From: r-help-boun..

Re: [R] Stuck using constrOptim

2009-04-23 Thread dre968
if i run the same program with constrOptim(p0,minsquare,keys=keys,benKeys=benKeys,NULL,ui=A,ci=B,method="BFGS") i get the following error: Error in dR(theta, theta.old, ...) : could not find function "grad" i'm not very mathematically inclined, i dont even know what a gradient is. any suggesti

Re: [R] simple for loop question - how do you exit?

2009-04-23 Thread Greg Snow
To "break" out of a loop early, use the "break" command (or rethink your logic and use a different type of loop, often if you will be commonly leaving the loop, a while loop may make more sense than a for loop). -- Gregory (Greg) L. Snow Ph.D. Statistical Data Center Intermountain Healthcare gr

Re: [R] Stuck using constrOptim

2009-04-23 Thread Ravi Varadhan
Hi, The constrOptim function used "Nelder-Mead" for the inner iterations, when gradient is not specified. Nelder-Mead is not good when you have a non-small number of parameters. I would sugest that you specify method = "BFGS" in the call to constrOptim. This might help. Ravi. -

Re: [R] function output with for loop and if statement

2009-04-23 Thread Richard M. Heiberger
tmp.out.sort <- tmp.out[, order(names(tmp.out))] tmp.out.sort <- tmp.out[, order(names(tmp.out)), drop=FALSE] >From your description of misbehavior with a single column, I think the drop=FALSE argument will provide the protection you need. Then you will not need the if clause. See ?`[.data.fram

Re: [R] Stuck using constrOptim

2009-04-23 Thread dre968
Sorry for the not enough info. the code seems to work for 10 or so variables but stops optimizing if i give it anymore than that. #Load data Data <- read.table..csv',head=TRUE,sep=",",stringsAsFactors = FALSE) #Load goal variables. this is what i'm trying to minimize to Z<-read.tablecsv

Re: [R] function output with for loop and if statement

2009-04-23 Thread aaron wells
Gavin, thank you for the suggestions. Unfortunately the function is still not working correctly. Below are the dummy datasets that you requested. In the function dummy.vegdata = vegetation; and dummy.spplist = specieslist. A little clarification on why the if statement is in the function. I

[R] iteration limit error in gamm and notExp2

2009-04-23 Thread isidora k
hi, I am trying to run a mixed effect gam using gamm (mgcv) and I get the following error: "Error in lme.formula(y ~ X - 1, random = rand, data = strip.offset(mf), : nlminb problem, convergence error code = 1 message = iteration limit reached without convergence (9)" I've read all about 'notExp

[R] latex(Hmisc): cgroup + rownames shifts column names

2009-04-23 Thread Michael Erickson
I have submitted this as a bug (http://biostat.mc.vanderbilt.edu/trac/Hmisc/ticket/29) but I am wondering if anyone else has seen it or perhaps developed a workaround. I could certainly fix the LaTeX by hand, but I am using this inside Sweave, so it is a bit cumbersome. The exact same code used t

Re: [R] Stuck using constrOptim

2009-04-23 Thread Ravi Varadhan
The information you have provided is not enough. Please read the posting guide on how ask for help. Provide a reproducible example so we can help you. Ravi. --- Ravi Varadhan, Ph.D. Assistant Professor, The Center

[R] Loess over split data

2009-04-23 Thread Luc Villandre
Dear R users, I am having trouble devising an efficient way to run a loess() function on all columns of a data.frame (with the x factor remaining the same for all columns) and I was hoping that someone here could help me fix my code so that I won't have to resort to using a for loop. (You'll

Re: [R] SAGE: was large factorials

2009-04-23 Thread Wacek Kusnierczyk
Albyn Jones wrote: > On Wed, Apr 22, 2009 at 08:26:51PM -0700, Ben Bolker wrote: > > >> ??? octave is a Matlab clone, not a Mathematica clone (I would be >> interested in an open source Mathematica clone ...) ??? >> >> > > You might take a look at Sage. It is not a mathematica clone, bu

Re: [R] R 2.9 binaries for redhat entreprise 4 / X86_64

2009-04-23 Thread José Matos
On Thursday 23 April 2009 15:08:26 Marc Schwartz wrote: > I can't speak to the timeline for the CRAN RPMs, but you might also > want to keep an eye on the EPEL repos, which provide add-on RPMs for > RHEL. > > More info here: > >http://fedoraproject.org/wiki/EPEL > > and the specific link fo

Re: [R] Stuck using constrOptim

2009-04-23 Thread dre968
Sorry i Mean 900x1 not 3x900 below dre968 wrote: > > Trying to use constrOptim to minimize the sum of squared deviations. I > put the objective function in as: sum((x %*% Y - Z)^2) so i'm trying to > get values for x to minimize the sum of the squared deviations between the > product of x and Y

[R] Stuck using constrOptim

2009-04-23 Thread dre968
Trying to use constrOptim to minimize the sum of squared deviations. I put the objective function in as: sum((x %*% Y - Z)^2) so i'm trying to get values for x to minimize the sum of the squared deviations between the product of x and Y and Z. Anyways i have no problem using this when x is a 3

Re: [R] qqnorm.lme & pairs.lme

2009-04-23 Thread Kingsford Jones
The model has multiple levels of random effects, so you need to tell qqnorm.lme which one you're interested in. e.g. qqnorm(m1, ~ranef(., level=1)) hth, Kingsford Jones On Thu, Apr 23, 2009 at 11:03 AM, Patrick Zimmerman wrote: > Hello, > > I am trying to do some plotting to check random e

Re: [R] surface interpolating 3d

2009-04-23 Thread Kingsford Jones
There are a variety of interplation tools to choose from (kriging, splines, inverse-distance-weighting, ...), and a variety of ways to do each of these in R. For example, have a look at the help page and examples for krige in package gstat, krige.conv in geoR, or Krig in package fields. hth, Kin

Re: [R] simple for loop question - how do you exit?

2009-04-23 Thread dre968
Nevermind i got it dre968 wrote: > > I have a loop and an if statement in the loop. once the if statement is > true for 1 value in the loop i'd like to exit the loop. is there a > command to do this? i know its going to be something like exit and i feel > stupid asking this question > -- V

Re: [R] simple for loop question - how do you exit?

2009-04-23 Thread Chuck Cleland
On 4/23/2009 2:29 PM, dre968 wrote: > I have a loop and an if statement in the loop. once the if statement is true > for 1 value in the loop i'd like to exit the loop. is there a command to do > this? i know its going to be something like exit and i feel stupid asking > this question Type ?"i

Re: [R] simple for loop question - how do you exit?

2009-04-23 Thread Duncan Murdoch
On 4/23/2009 2:29 PM, dre968 wrote: I have a loop and an if statement in the loop. once the if statement is true for 1 value in the loop i'd like to exit the loop. is there a command to do this? i know its going to be something like exit and i feel stupid asking this question You want "break

[R] simple for loop question - how do you exit?

2009-04-23 Thread dre968
I have a loop and an if statement in the loop. once the if statement is true for 1 value in the loop i'd like to exit the loop. is there a command to do this? i know its going to be something like exit and i feel stupid asking this question -- View this message in context: http://www.nabble.c

[R] suffix convention?

2009-04-23 Thread Sebastian P. Luque
Hi, Is there some convention for choosing 'RData' or 'rda' for binary files written by save() or save.image()? The docs treat these interchangeably. Thanks. Cheers, -- Seb __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/

[R] How to construct confidence bands from a gls fit?

2009-04-23 Thread Maik Renner
Dear R-list, I would like to show the implications of estimating a linear trend to time series, which contain significant serial correlation. I want to demonstrate this, comparing lm() and an gls() fits, using the LakeHuron data set, available in R. Now in my particular case I would like to draw

[R] R 2.8.1 change user input color of R scrpt too

2009-04-23 Thread matildet
Hello R community I'm using R 2.8.1 version and would like to change the color of user input for script pages. Once I have changed the color of console background and user input (by means of Interface Preferences menu), the color of script background has been automatically changed but the color o

[R] qqnorm.lme & pairs.lme

2009-04-23 Thread Patrick Zimmerman
Hello, I am trying to do some plotting to check random effect assumptions for a model I fit using lme. I want to use qqnorm and pairs (similarly to examples given in Pinheiro & Bates p. 188), but it's not working. Here's some relevant code and the error message: library(nlme) data(Machines) m1

Re: [R] Load a data from oracle database to R

2009-04-23 Thread Marc Schwartz
On Apr 23, 2009, at 12:18 PM, Gagan Pabla wrote: Hello, I am have trying to load data in R by connecting R to the database the following way: library(RODBC) channel<-odbcConnect("gagan") now after I connect to the server by putting pwd. I want to load table from the database named "temp"

[R] SAGE: was large factorials

2009-04-23 Thread Albyn Jones
On Wed, Apr 22, 2009 at 08:26:51PM -0700, Ben Bolker wrote: > > ??? octave is a Matlab clone, not a Mathematica clone (I would be > interested in an open source Mathematica clone ...) ??? > You might take a look at Sage. It is not a mathematica clone, but open source mathematical software

[R] Load a data from oracle database to R

2009-04-23 Thread Gagan Pabla
Hello, I am have trying to load data in R by connecting R to the database the following way: > library(RODBC) > channel<-odbcConnect("gagan") now after I connect to the server by putting pwd. I want to load table from the database named "temp" in to R so that I can do some descriptive statistics

Re: [R] fitting assimptotic decaing with - and + on X

2009-04-23 Thread milton ruser
Hi Christian, Thank you very much for the help. Now I can run. But my main interest is on the region of x[-200 to +200] and as you can see this logistic regression not fit very well. You think that using other package / function I can get better fit of these data? Best wishes, miltinho brazil-t

Re: [R] Floating simulation error

2009-04-23 Thread Nordlund, Dan (DSHS/RDA)
> -Original Message- > From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On > Behalf Of Brendan Morse > Sent: Thursday, April 23, 2009 9:12 AM > To: r-help@r-project.org > Subject: [R] Floating simulation error > > > Hi all, I am running a simulation and a curious e

Re: [R] Floating simulation error

2009-04-23 Thread David M Smith
Cosmic rays, perhaps? :) http://blog.revolution-computing.com/2009/04/blame-it-on-cosmic-rays.html Seriously though, my guess is that the simulation data from your 201st iteration is tickling some subtle bug in your code. This has happened to me before where I generate a random matrix that happens

Re: [R] Floating simulation error

2009-04-23 Thread Bert Gunter
?traceback options("error") ( ?options) ?debug ?try ?tryCatch R has facilities to help you with such problems. Please use them -- and then repost with more specific info if you still cannot solve it. -- Bert Gunter -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-

Re: [R] power.t.test formula

2009-04-23 Thread Peter Dalgaard
Usuario R wrote: > Hi, > > Does anyone of you knows a reference for the formula used in power.t.test > function? And also why it uses the Student's distribution instead of Normal. > (I know both of them can be used but don't see whether choose one or the > other) It is a straightforward first-pr

[R] update.packages(checkBuilt=TRUE) returns Error: invalid version specification NA in 2.9.0

2009-04-23 Thread Peter_Keller
I installed R-2.9.0 yesterday, and followed the instructions in the R for Windows FAQ, 2.8 What's the best way to upgrade? It reads "run update.packages(checkBuilt=TRUE, ask=FALSE) in the new R and then delete anything left of the old installation." I did this but it returned an error. It's th

[R] Floating simulation error

2009-04-23 Thread Brendan Morse
Hi all, I am running a simulation and a curious error keeps coming up that stops the whole process. The error is a subscript out of bounds error, and it seems to happen at different points (floating around) throughout the looping simulation. Say, for example, it crashes on sample 1 - itera

[R] power.t.test formula

2009-04-23 Thread Usuario R
Hi, Does anyone of you knows a reference for the formula used in power.t.test function? And also why it uses the Student's distribution instead of Normal. (I know both of them can be used but don't see whether choose one or the other) Thank you. Regards [[alternative HTML version deleted

Re: [R] boxplot of two variables

2009-04-23 Thread Mike Lawrence
Check out ggplot2: http://had.co.nz/ggplot2 especially: http://had.co.nz/ggplot2/geom_boxplot.html But you are strongly advised to read the book: http://had.co.nz/ggplot2/book/ On Thu, Apr 23, 2009 at 12:13 PM, Gabriel R. Rodriguez wrote: > Hello ! > > > > I have a dataframe with 6 variables (

[R] Course announcement: R for Financial Data Analysis in New York (July 16-18th)

2009-04-23 Thread Francisco Gochez
Dear userRs, Mango Solutions are pleased to announce that we will deliver a 3-day introductory R course focused on financial analysis in New York on the 16-18th of July. The course topics are as follows: * Introduction * The R Environment * Data Objects * Functions *

Re: [R] R-User groups in North America (SF, LA, NYC, Ottawa)

2009-04-23 Thread Michael E. Driscoll
Folks, Here is the correct URL for the NYC R Users group: New York City http://www.meetup.com/nyhackr (61 members) Organized by Joshua Reich (Thanks to Johnathan Boysielal for pointing out this error, and Curt for the OSU correction as well). On Wed, Apr 22, 2009 at 12:01 PM, Michael E. Dr

[R] boxplot of two variables

2009-04-23 Thread Gabriel R. Rodriguez
Hello ! I have a dataframe with 6 variables (A1,A2,B1,B2,C1,C2) and 1 factor (F). I would like to produce a graph consisting of 3 boxplots sets, one for every two variables (i.e A1 &A2) by the factor (F). I was looking around and I cannot figure it out, any suggestions? Best Regards,

Re: [R] R 2.9 binaries for redhat entreprise 4 / X86_64

2009-04-23 Thread Mathieu Van der Haegen
Hi ! Thank you for the info. Is this a little bit stable ? Mathieu On 23 Apr 2009, at 16:01, R P Herrold wrote: On Thu, 23 Apr 2009, Mathieu Van der Haegen wrote: I'd like to ask if someone could tell me when the binaries for R 2.9 / redhat entreprise 4 / X86_64 will be available ? I don

Re: [R] Adobe FLEX interacting with R for rich visualization over the Web

2009-04-23 Thread Jeffrey Horner
Harsh wrote on 04/23/2009 09:49 AM: Hi R users, I am looking to create a rich internet application using R as the analytical back-end with a GUI written entirely in Adobe FLEX. I have come across this paper http://www.bioconductor.org/packages/2.3/bioc/vignettes/RWebServices/inst/doc/RelatedWork.

Re: [R] large factorials

2009-04-23 Thread Gabor Grothendieck
One more improvement. Perhaps it would be best just to return a numeric so sum1 inputs and outputs numerics: library(rSymPy) # define factorial to return a Sym object factorial.Sym <- function(n) Sym("factorial(", n, ")") sum1 <- function(l,u,t,i,n,w) { v <- 0 for (m in 0 :w) { v1 <-

Re: [R] Plots - several pages per pdf - quality/size issue

2009-04-23 Thread Richard . Cotton
> I hope that question will not be too redundant (sorry if it is) but > i don't seem able to find the answer i need in the archives... > > I try to create a file which would have 1.several pages and 2. > several plots by page. I know how to make a pdf file this way, but > my problem is that the

Re: [R] transposing a matrix - row by row?

2009-04-23 Thread Dimitri Liakhovitski
Thank you very much, Thierry! Really amazing, the magic melt from reshape. And, in fact, a bit dangerous - it just do what I need without any efforts on my part! Dimitri On Thu, Apr 23, 2009 at 10:40 AM, ONKELINX, Thierry wrote: > Dear Dimitri, > > Have a look at melt() from the reshape package.

[R] Adobe FLEX interacting with R for rich visualization over the Web

2009-04-23 Thread Harsh
Hi R users, I am looking to create a rich internet application using R as the analytical back-end with a GUI written entirely in Adobe FLEX. I have come across this paper http://www.bioconductor.org/packages/2.3/bioc/vignettes/RWebServices/inst/doc/RelatedWork.pdf which provides relevant informatio

Re: [R] transposing a matrix - row by row?

2009-04-23 Thread Dimitris Rizopoulos
one way is the following: X <- matrix(c(10,20,30,40,50,60), 2, 3, dimnames = list(c("1","2"), c("1","2","3"))) tX <- t(X) cbind( rows = c(col(tX)), columns = c(row(tX)), entries = c(tX) ) I hope it helps. Best, Dimitris Dimitri Liakhovitski wrote: Hello, I have a matrix tha

Re: [R] large factorials

2009-04-23 Thread Gabor Grothendieck
The code in my prior post works (except one comment was wrong) but try this instead. The only change is the last line of the sum1 function. This way it produces a Sym object rather than a character string. library(rSymPy) # define factorial to return a Sym object factorial.Sym <- function(n) S

Re: [R] transposing a matrix - row by row?

2009-04-23 Thread ONKELINX, Thierry
Dear Dimitri, Have a look at melt() from the reshape package. X<-matrix(c(10,20,30,40,50,60),2,3) dimnames(X)<-list(c("1","2"),c("1","2","3")) library(reshape) melt(X) HTH, Thierry ir. Thierry Onkelinx Instituut vo

Re: [R] large factorials

2009-04-23 Thread Gabor Grothendieck
sympy() returns a character string, not an R numeric -- it shouldn't automatically return an R numeric since R can't represent all the numbers that sympy can. The development version of rSymPy has a second class which produces objects of class c("Sym", "character") and those can be manipulated wit

[R] Plots - several pages per pdf - quality/size issue

2009-04-23 Thread Sarah Bonnin
Dear R-experts, I hope that question will not be too redundant (sorry if it is) but i don't seem able to find the answer i need in the archives... I try to create a file which would have 1.several pages and 2.several plots by page. I know how to make a pdf file this way, but my problem is th

[R] transposing a matrix - row by row?

2009-04-23 Thread Dimitri Liakhovitski
Hello, I have a matrix that is a product of tapply on a larger data set. Let's assume it looks like this: X<-matrix(c(10,20,30,40,50,60),2,3) dimnames(X)<-list(c("1","2"),c("1","2","3")) (X) 1 2 3 1 10 30 50 2 20 40 60 Is there an efficient way of transforming this matrix into the followi

[R] Problem to get a simple Analysis of Variance table with lmer()

2009-04-23 Thread Julien Beguin
Dear R users, Is someone know how to get a simple analysis of variance table using other random distribution than normal (ex: Poisson or Binomial)? When I try, I recieved this message: (See my R code below) - R response Erreur dans anova(fit.poisso

[R] Plots - several pages per pdf - quality/size issue

2009-04-23 Thread Sarah Bonnin
Dear R-experts, I hope that question will not be too redundant (sorry if it is) but i don't seem able to find the answer i need in the archives... I try to create a file which would have 1.several pages and 2.several plots by page. I know how to make a pdf file this way, but my problem is that

Re: [R] R 2.9 binaries for redhat entreprise 4 / X86_64

2009-04-23 Thread Marc Schwartz
On Apr 23, 2009, at 8:18 AM, Mathieu Van der Haegen wrote: Hi everybody. I'd like to ask if someone could tell me when the binaries for R 2.9 / redhat entreprise 4 / X86_64 will be available ? I don't need a precise date but some indication like 1 month, 6 month, never ? Thank you for any help

Re: [R] Setting lattice par parameters

2009-04-23 Thread Steve_Friedman
Sundar, Thank you very much. I see my mistake. Much appreciated. Steve Friedman Ph. D. Spatial Statistical Analyst Everglades and Dry Tortugas National Park 950 N Krome Ave (3rd Floor) Homestead, Florida 33034 steve_fried...@nps.gov Office (305) 224 - 4282 Fax (305) 224 - 4147

Re: [R] large factorials

2009-04-23 Thread Ravi Varadhan
Hi Samantha, It is quite likely that you are not doing something right when you are explicitly computing large factorials. There is probably a good asymptotic approximation that will simplify things for you. In my experience, there is seldom a need to explicitly compute factorials of integers.

[R] R 2.9 binaries for redhat entreprise 4 / X86_64

2009-04-23 Thread R P Herrold
On Thu, 23 Apr 2009, Mathieu Van der Haegen wrote: I'd like to ask if someone could tell me when the binaries for R 2.9 / redhat entreprise 4 / X86_64 will be available ? I don't need a precise date but some indication like 1 month, 6 month, never ? How about: Now, in Red Hat's RawHide archive

Re: [R] large factorials

2009-04-23 Thread molinar
Here is what I did: library(rSymPy) factorial.sympy <- function(n) sympy(paste("factorial(", n, ")")) factorial.sympy(171) [1] "1241018070217667823424840524103103992616605577501693185388951803611996075221691752992751978120487585576464959501670387052809889858690710767331242032218484364310473577889

Re: [R] Setting lattice par parameters

2009-04-23 Thread Sundar Dorai-Raj
Because you're not calling trellis.par.set correctly. It should be: trellis.par.set(par.ylab.text = list(cex = 0.65), par.xlab.text = list(cex = 0.65)) However, I usually do things like this: my.theme <- list(par.ylab.text = list(cex = 0.65), par.xlab.text = list(cex = 0.65)) barchart(..., par.s

[R] R 2.9 for redhat entreprise 4 / X86_64

2009-04-23 Thread Mathieu Van der Haegen
Hi everybody. I'd like to ask if someone could tell me when the binaries for R 2.9 / redhat entreprise 4 / X86_64 will be available ? I don't need a precise date but some indication like 1 month, 6 month, never ? Thank you for any help. Mathieu --- Mathieu Van der Haegen Machine Learning Gr

[R] argument 'exclude' in xtabs

2009-04-23 Thread Matthieu Lesnoff
Dear all I was willing to use argument 'exclude' in function xtabs to remove some levels of factors (xtabs help page says '"exclude: a vector of values to be excluded when forming the set of levels of the classifying factors"). I tried: > mydata <- data.frame( + treatment = c("B", "A", "C"

[R] R 2.9 binaries for redhat entreprise 4 / X86_64

2009-04-23 Thread Mathieu Van der Haegen
Hi everybody. I'd like to ask if someone could tell me when the binaries for R 2.9 / redhat entreprise 4 / X86_64 will be available ? I don't need a precise date but some indication like 1 month, 6 month, never ? Thank you for any help. Mathieu --- Mathieu Van der Haegen Machine Learning Gr

[R] surface interpolating 3d

2009-04-23 Thread calpeda
Hi all, When you want to draw a surface with a mathematics program you need of two vectors x and y and a matrix z. Then you plot the surface. For example: x=[1 2 3]; y=[5 6 7]; z=[1 2 3 4 5 6 7 8 9]; For my applications I have a 3 vectors x, y, z, that are the coordinates x, y, and z of poin

Re: [R] large factorials

2009-04-23 Thread molinar
Thank you everyone all of your posts were very helpful. I tried each one and I think I have about 10 new packages installed. The formula I need to calculate did not involve any logarithms but infinite summations of factorials, I'm sorry for not specifying. I read some things about using logarit

[R] Setting lattice par parameters

2009-04-23 Thread Steve_Friedman
Hello I'm plotting a large suite of barcharts and need to modify the size of the text for both the yaxis and xaxis labels. I've tried using the following: > trellis.par.set(list(par.ylab.text = list(cex = 0.65)), trellis.par.set(list = par.xlab.text = list(cex = 0.65 On inspection, howeve

Re: [R] R: R: R: how to split and handle a big R program into multiple files

2009-04-23 Thread baptiste auguie
May I suggest you join R-forge when your package has taken shape? It'll allow you to easily check the building of the package on all platforms and you'll be able to submit to CRAN in one click when it's good enough. baptiste On 23 Apr 2009, at 13:58, mau...@alice.it wrote: > Submitting to

  1   2   >