Re: [R] Newbie R question PART2

2009-04-29 Thread Tena Sakai
Hi, The example given: library(hwriter) htmlFile = tempfile() hwrite("Hello World", htmlFile) browseURL(htmlFile) worked. Including the line: example(hwrite) which is very nice. But I am a bit confused. Am I using elements of Rpad package? Or is this strictly to do with hwriter pack

Re: [R] Understanding padding in lattice

2009-04-29 Thread Paul Murrell
Hi In the development version of R, there is a new showViewport() function that might help with debugging this sort of thing. Try ... showViewport() ... or possibly ... showViewport(newpage=TRUE) ... just after drawing your plot. Paul Deepayan Sarkar wrote: > On Tue, Apr 28, 2009 at 11:51

[R] How to replace values?

2009-04-29 Thread Suhaila Zainudin
Hello all, I have a list of genes as follows (A) Number  GeneName 0 YAR003W 1 YAR007C 2 YAR008W 3 YBL035C 4 YBL111C 5 YBL112C And I have a list of gene interactions as follows (B) 0 -> 1 1 -> 5 3 -> 4 2 -> 3 I want to repl

[R] Extracting Element from S4 objects

2009-04-29 Thread tbigdeli
Are there internal methods available for R2.6 (I'm using the mac os x gui) for extracting (or subsetting) S4 objects? Using the independence_test() function implemented in the COIN package, I can't seem to select out p-values upon completion of each iteration of a loop. Sorry if my search was in

[R] R Macro Question

2009-04-29 Thread Jenn
Dear all, I am a new R user, and I have a question about R macro. Here is the situation, I want to do item option analysis (options include: A , B, C, D), below is the codes for option A analyses. #option A analyses optiona<-mat.or.vec(nrow(responsedata2), ncol(responsedata2)) # create A matr

[R] plot scaling bug when using par(mfg)

2009-04-29 Thread Mark Cowley
Dear list, I've noticed a width/height scaling bug in multi-panel plots when you change the active plot using par mfg The underlying par setting that maps the full plot width (or height) to the numerical axis labels does not get updated when you change plots with par(mfg=...). Thus plotting

[R] Categorical variable in a custom nonlin function with gnm

2009-04-29 Thread Brett.Murphy
Hi all I want to construct a generalised nonlinear model (binomial family) using gnm, of the form: Response = a + b variable1 + c variable2 + d variable3 - d b variable4 - d c variable5, with the parameters b, c, and d appearing more than once. Hence, I think I need to use a custom nonlin fun

Re: [R] Legend best position

2009-04-29 Thread Frank E Harrell Jr
This may not be what you are wanting but see the labcurve function in the Hmisc package, which helps you position things in the 'most empty' portions of the graphics region. Frank E Harrell Jr Professor and Chair School of Medicine Department of Biostatistics V

[R] Legend best position

2009-04-29 Thread Christian Bustamante
Hi all, I'm doing a lot of plots and all of them should have a legend. The problem is that this legend not always have to be in the same place, because some plots can override the legend box. I'm wondering if there exist a command that "optimally" allocate the legend position, I'm refer to a MATLA

[R] [help]how to estimate kernel density over samples from importance sampling

2009-04-29 Thread yk
Dear all: First we run simulation through normal distribution, like p(x)=1/b, b is length of sample length, the properties of simulation we got f(x) has an unknow distribution. Through kernel density estimation we could get f(x)'s approximate distribution. Now I have run simulation through importan

[R] Rpad installation help wanted (from NEWBIE)

2009-04-29 Thread Tena Sakai
Hi, I need a bit of help installing Rpad. My host runs redhat linux and I followed the instruction given in http://www.rpad.org/Rpad/ServerNote.html. I was clear for the most part. But I don't know what's going on with the last step: To update the javascript database for the R keyword sear

[R] OT : Interview SPSS 's Head Corporate Development Olivier

2009-04-29 Thread Ajay ohri
Slightly off topic from a technical help question/ answer but I thought it would be of interest to these forums. SPSS recently launched a major series of products in it’s text mining and data mining product portfolio and rebranded data mining to the PASW series. In an exclusive and extensive interv

Re: [R] Corrupt data frame construction - bug?

2009-04-29 Thread Steven McKinney
Thanks Duncan, Comments and a proposed bug fix in-line below: > -Original Message- > From: Duncan Murdoch [mailto:murd...@stats.uwo.ca] > Sent: Wednesday, April 29, 2009 5:10 PM > To: Steven McKinney > Cc: R-help@r-project.org > Subject: Re: [R] Corrupt data frame construction - bug? >

Re: [R] AICc

2009-04-29 Thread Ben Bolker
Katie Stumpf wrote: > > I am fitting logistic regression models, by defining my own link > function, and would like to get AICc values. Using the glm command > gives a value for AIC, but I haven't been able to get R to convert > that to AICc. Is there a code that has already been writte

Re: [R] mode(x) <- "double"

2009-04-29 Thread Dimitri Liakhovitski
Can you give an example of your .txt file that you are reading in? On Wed, Apr 29, 2009 at 1:38 PM, aledanda wrote: > > Hi, > I need your help!! > I imported a big coloumn vector from a txt file but it results as mode > :"list" I want to change it in numeric otherwise I can't do my analysis. > Th

Re: [R] Corrupt data frame construction - bug?

2009-04-29 Thread Duncan Murdoch
On 29/04/2009 6:41 PM, Steven McKinney wrote: Hi useRs, A recent coding infelicity along these lines yielded a corrupt data frame. foo <- matrix(1:12, nrow = 3) bar <- data.frame(foo) bar$NewCol <- foo[foo[, 1] == 4, 4] bar lapply(bar, length) foo <- matrix(1:12, nrow = 3) bar <- data.fram

Re: [R] Data type question: converting dates

2009-04-29 Thread Gabor Grothendieck
See ?read.zoo in the zoo package and read the three vignettes library(zoo) vignette(package = "zoo") vignette("zoo") # etc. and help files for more info. On Wed, Apr 29, 2009 at 6:52 PM, Achilles Venetoulias wrote: > I have a text (csv) file) with two columns: dates and numeric measurements. >

[R] Data type question: converting dates

2009-04-29 Thread Achilles Venetoulias
I have a text (csv) file) with two columns: dates and numeric measurements. I read it using read.table and the dates get read as a factor, with as many levels as there are dates in the data. How can I create a matrix-like data structure (data frame?) which has one column of “real” dates (a vector

[R] Corrupt data frame construction - bug?

2009-04-29 Thread Steven McKinney
Hi useRs, A recent coding infelicity along these lines yielded a corrupt data frame. foo <- matrix(1:12, nrow = 3) bar <- data.frame(foo) bar$NewCol <- foo[foo[, 1] == 4, 4] bar lapply(bar, length) > foo <- matrix(1:12, nrow = 3) > bar <- data.frame(foo) > bar$NewCol <- foo[foo[, 1] == 4, 4]

Re: [R] Which features would you like to see on the crantastic.org community portal?

2009-04-29 Thread Bjørn Arild Mæland
> Hi, > > As some of you know, one of the R Projects ideas for GSOC 2009 is to > expand the crantastic.org portal. Some ideas for what should be done > is mentioned in Hadley Wickham's project description [1], others have > been briefly mentioned on this mailing list before. Undoubtedly, > however,

Re: [R] Newbie R question PART2

2009-04-29 Thread Tena Sakai
Hi Martin, You hit the nail at its head! Exactly what I wanted. I will experiment with what you gave and hopefully expand the idea beyond 'Hello World!' Many thanks. Regards, Tena Sakai tsa...@gallo.ucsf.edu -Original Message- From: Martin Morgan [mailto:mtmor...@fhcrc.org] Sent: We

Re: [R] Error with Design.Function(fit)

2009-04-29 Thread Frank E Harrell Jr
x wrote: Hi all, I'm reposting this with a more appropriate subject. Do I need to define limits as the error message seems to suggest? If so, how? The error message, my code, the output and the first few lines of my data are all below. Thank you! "Error in Getlim(at, allow.null = TRUE, need

Re: [R] help converting for loop to vector operation

2009-04-29 Thread Avram Aelony
Dear List, Hadley offered the following solution: >library(plyr) >l_ply(2:6, draw_metric_by_date, df = economics, smooth = TRUE, BASEPATH = >basepath) Many thanks, Avram On Wednesday, April 29, 2009, at 12:59PM, "Avram Aelony" wrote: > >Dear List, > >I have a wrapper function that d

Re: [R] Re moving unwanted double values in list

2009-04-29 Thread Jim Regetz
Hi Josh, Comments below. Josh Roll wrote: What you suggested works perfectly for the question i posed. Hoever, on further inspection by additional numbers cannot be thrown out and instead need to be added to the list somehow. I tried specifying the list dimensions but that causes proble

Re: [R] Selecting vector elements using other vectors

2009-04-29 Thread Charles C. Berry
See ?is.element ?%in% HTH, Chuck On Wed, 29 Apr 2009, 00alastair00 wrote: Dear R-Help, I have a data frame and a vector df=data.frame(Letter=c("Z","Q","R","A","E","F"), Number=c(11,32,4,1,9,3)) v=c("C","Q","R","A","E") From df, I'd like to construct a subset of the field

Re: [R] How do I sample "cases" within a matrix?

2009-04-29 Thread Charles C. Berry
See below On Wed, 29 Apr 2009, Silvia Lomascolo wrote: Hi R community, I am trying to obtain a sample from a matrix but sample(my.matrix) doesn't do what I need. I have a matrix of 1287 interactions between the species in columns and the species in rows and I want to obtain a smaller matrix w

Re: [R] Evaluation of an expression as function argument

2009-04-29 Thread Uwe Ligges
Sebastien Bihorel wrote: Dear R-users, I would like to know if is it possible to set a function argument as an evaluated expression. I have tried several syntaxes, including the following example, but could not get it anything to run. The plot function is used here but I would like to later

[R] convex polygon filling an empty void in a cloud of points

2009-04-29 Thread mgierdal
Hi, I am trying to locate an R function/package to calculate a convex polygon that fills an empty void in a cloud of points (sort of opposite to a convex hull, for which many function can be found in R). Thanks, Marcin -- View this message in context: http://www.nabble.com/convex-polygon-filli

Re: [R] 2 way ANOVA with possible pseudoreplication

2009-04-29 Thread Andrew Dolman
Hi Natalie, It sounds like a mixed model might be appropriate but it's not completely clear what your data are like. How many levels are there of each factor? Or is each factor just binary (treatment or no treatment)? What did you measure as the response? It's a good idea to post a sample of your

Re: [R] Evaluation of an expression as function argument

2009-04-29 Thread baptiste auguie
Try this, items <- c(list(col=2),list(pch=2)) par(mfrow=c(2, 1)) for (ii in seq(2)) { do.call(function(x, y, ... ) plot(1:10, ...), items[ii]) } ?do.call HTH, baptiste On 29 Apr 2009, at 19:30, Sebastien Bihorel wrote: Dear R-users, I would like to know if is it possible to set a fun

Re: [R] help converting for loop to vector operation

2009-04-29 Thread baptiste auguie
Hi, Here's one approach that I find perhaps more elegant than sweeping through the columns by their index, library(ggplot2) data(economics) str(economics) # library(reshape) d <- melt(economics, id="date") foo <- function(var="pop", d, smooth=FALSE, ... ) { p <- qplot( data=subs

Re: [R] Hierarchical Diagram of Networks in sna or otherwise?

2009-04-29 Thread Gábor Csárdi
Jarrett, the 'igraph' package has a layout called layout.reingold.tilford that is designed for trees, there is a slight chance that it is good enough for you. Best, Gabor On Wed, Apr 29, 2009 at 10:11 PM, jebyrnes wrote: > > I've been using sna to work with some networks, and am trying to visua

[R] search R vignettes

2009-04-29 Thread Liviu Andronic
Dear all, To list all vignettes installed on my system, I would issue `vignette(all = TRUE)'. But how can one search for a "topic" in all vignettes available on CRAN? One method was suggested here [1]---search on Google: `smth filetype:pdf site:cran.r-project.org/doc/vignettes'---, but it does not

Re: [R] Newbie R question PART2

2009-04-29 Thread Tena Sakai
Hi Ista, Many thanks for your suggestion. I started reading the manual. It is a perfect size for me, not too short, not too long. I'll study and play with it. Regards, Tena Sakai tsa...@gallo.ucsf.edu -Original Message- From: Ista Zahn [mailto:istaz...@gmail.com] Sent: Wed 4/29/2009

Re: [R] Newbie R question PART2

2009-04-29 Thread Tena Sakai
Hi, Thanks for the warning. I'll be careful. Tena Sakai tsa...@gallo.ucsf.edu -Original Message- From: Stefan Evert [mailto:stefan.ev...@uos.de] Sent: Wed 4/29/2009 5:44 AM To: Wacek Kusnierczyk; Tena Sakai Cc: R help Subject: Re: [R] Newbie R question PART2 > the little r comes fro

Re: [R] Newbie R question PART2

2009-04-29 Thread Tena Sakai
Hi, Thank you for littler webpage. It is quite interesting. Tena Sakai tsa...@gallo.ucsf.edu -Original Message- From: Wacek Kusnierczyk [mailto:waclaw.marcin.kusnierc...@idi.ntnu.no] Sent: Wed 4/29/2009 1:22 AM To: Tena Sakai Cc: r-h...@stat.math.ethz.ch Subject: Re: [R] Newbie R quest

[R] Hierarchical Diagram of Networks in sna or otherwise?

2009-04-29 Thread jebyrnes
I've been using sna to work with some networks, and am trying to visualize them easily. My networks are hierarchical (food webs). All of the layout engines I've tried with gplot don't seem to plot hierarchical networks, as one would using dot from graphviz. While I could do all of this by outpu

[R] help converting for loop to vector operation

2009-04-29 Thread Avram Aelony
Dear List, I have a wrapper function that draws a graph that I'd like to use in a vector-like manner. The for-loop version I currently use is below. library(ggplot2) data(economics) h <- 600 w <- 800 #-- draw_metric_by_date <- functio

[R] arma model with garch errors

2009-04-29 Thread Joseph Magagnoli
Dear R experts, I am trying to estimate an ARMA 2,2 model with garch errors. I used the following code on R 2.9. #library library(fGarch) #data data1<-ts(read.table("C:/Users/falcon/Desktop/Time Series/exports/goods1.csv"), start=c(1992,1), frequency=12) head(data1) #garch garchFit(formula.mean=

Re: [R] Optim and hessian

2009-04-29 Thread Ravi Varadhan
Are you using optim() function in R? Although I am not sure what your problem really is (as you haven't provided sufficient information), it may be that the hessian computation in optim() is not accurate enough for you. Try the function hessian() in the "numDeriv" package. It is very accurate.

[R] Evaluation of an expression as function argument

2009-04-29 Thread Sebastien Bihorel
Dear R-users, I would like to know if is it possible to set a function argument as an evaluated expression. I have tried several syntaxes, including the following example, but could not get it anything to run. The plot function is used here but I would like to later apply the same approach to

Re: [R] Normal distribution with R

2009-04-29 Thread Eik Vettorazzi
Hi James its just simple calculus, since with q90<-qnorm(.9,me,sd) q10<-qnorm(.1,me,sd) mean<-(q90+q10)/2# the normal distribution is symmetric around the mean sd<-(q90-q10)/ (qnorm(.9)-qnorm(.1)) # between 10th and 90th are qnorm(.9)-qnorm(.1)=2.563103sds hth. g...@ucalgary.ca schrieb:

[R] RODBC inside MS Access Sub

2009-04-29 Thread Felipe Carrillo
HI: Is it possible to use the RODBC package within MS Access. I have been using from R but was just wondering if it could be used along with R(D)COM. Something like this: Dim dbs As DAO.Database Dim rst As DAO.Recordset Dim myApp As StatConnector Set myApp = New StatConnector myApp.GetErrorText

[R] Dynamic visualisation of R data using Adobe FLEX

2009-04-29 Thread Harsh
Hi useRs, I had posted about Adobe FLEX talking to R for rich visualisation. Reply from Jeffery Horner contained links to the revolution-computing.com webpage which had information pertaining to the Bay Users R group Meetup on Web Dashboards with R. I have a very specific project that I need to i

Re: [R] library which convert dates

2009-04-29 Thread stephen sefick
look at zoo and chron On Wed, Apr 29, 2009 at 8:54 AM, Grześ wrote: > > I'm looking for library  which let mi convert dates > > for example like this: > 00-06-05 00:00 > 00-08-06 00:00 > 00-08-16 00:00 > 00-05-23 00:00 > 00-01-14 00:00 > 00-10-28 00:00 > > and as a result I want to get a 3 levels

[R] Error with Design.Function(fit)

2009-04-29 Thread x
Hi all, I'm reposting this with a more appropriate subject. Do I need to define limits as the error message seems to suggest? If so, how? The error message, my code, the output and the first few lines of my data are all below. Thank you! "Error in Getlim(at, allow.null = TRUE, need.all = TRU

Re: [R] Understanding padding in lattice

2009-04-29 Thread Sebastien Bihorel
Thanks *Sebastien Bihorel, PharmD, PhD* PKPD Scientist Cognigen Corp Email: sebastien.biho...@cognigencorp.com Phone: (716) 633-3463 ext. 323 Deepayan Sarkar wrote: On Tue, Apr 28, 2009 at 11:51 AM, Sebastien Bihorel wrote: Dear R-users, I am

[R] Selecting vector elements using other vectors

2009-04-29 Thread 00alastair00
Dear R-Help, I have a data frame and a vector df=data.frame(Letter=c("Z","Q","R","A","E","F"), Number=c(11,32,4,1,9,3)) v=c("C","Q","R","A","E") >From df, I'd like to construct a subset of the field "Number", with deletions dictated by the vector, v, of letters. I've succeeded in doing this fo

[R] AICc

2009-04-29 Thread Katie Stumpf
I am fitting logistic regression models, by defining my own link function, and would like to get AICc values. Using the glm command gives a value for AIC, but I haven't been able to get R to convert that to AICc. Is there a code that has already been written for this? Right now I am just

[R] mode(x) <- "double"

2009-04-29 Thread aledanda
Hi, I need your help!! I imported a big coloumn vector from a txt file but it results as mode :"list" I want to change it in numeric otherwise I can't do my analysis. This is what i get: mode (data) <- "double" Error in eval(expr, envir, enclos) : (list) object cannot be coerced to type 'doubl

[R] Optim and hessian

2009-04-29 Thread Marcel Rodrigues Lopes
Hi, my name is Marcel R. Lopes. My problem is, I made a code to calculate the estimates of a Cox model with random effects. Used to optimize the R command for this. The estimates were calculated correctly, but the Hessian matrix does not have good values. The same thing was done in SAS and gave go

[R] meta regression in R using lme function

2009-04-29 Thread Jan van de Kassteele
Dear all, We are trying to do a meta regression in R using the lme function. The reason for doing this with lme function is that we have covariates and studies within references. In S-Plus this is possible by using the following command: lme(outcome ~ covars, random = ~1 | reference/study, wei

[R] How do I sample "cases" within a matrix?

2009-04-29 Thread Silvia Lomascolo
Hi R community, I am trying to obtain a sample from a matrix but sample(my.matrix) doesn't do what I need. I have a matrix of 1287 interactions between the species in columns and the species in rows and I want to obtain a smaller matrix with say, 800 interactions, that may or may not have the same

Re: [R] problems with clipboard

2009-04-29 Thread Jamie.lannister
Thank you very much! See, I'm a new user both for R and mac.. :-) Jamie. Prof Brian Ripley wrote: > > On Tue, 28 Apr 2009, Jamie.lannister wrote: > >> >> Hi I'm a mac user. I have problems loading data from mac excel in R. >> I'm using these script: >>> library(utils) >>> data2 <- read.ta

[R] library which convert dates

2009-04-29 Thread Grześ
I'm looking for library which let mi convert dates for example like this: 00-06-05 00:00 00-08-06 00:00 00-08-16 00:00 00-05-23 00:00 00-01-14 00:00 00-10-28 00:00 and as a result I want to get a 3 levels -- View this message in context: http://www.nabble.com/library-which-convert-dates-tp232

Re: [R] problems with clipboard

2009-04-29 Thread Jamie.lannister
Thank you very much. I'll try. Jamie Kevin Middleton-3 wrote: > > > Jamie, > > Try it as: > > data2 <- read.table(pipe('pbpaste'), header = T) > > I have a read.clipboard() function defined in ~/.Rprofile: > > read.clipboard <- function(){read.table(pipe('pbpaste'), header = T)} > > Also s

[R] 2 way ANOVA with possible pseudoreplication

2009-04-29 Thread nat_h
Hi, I have an experiment with 2 independant factors which I have been trying to analyse in R. The problem is that there are several data points recorded on the same animal. However, no combination of treatments is repeated on the same animal. All possible combinations of treatments are done in a

[R] Re sidual variance in lmer

2009-04-29 Thread tomal
Hello everybody, using the lmer function, I have fitted the following logistic mixed regression model on an experimental data set containing one fixed factor (Cond) and three random variables (Sito, Area, Trans): > model<-lmer(Caul~Cond+(1|Sito)+(1|Area)+(1|Trans), data=dataset, > family=binomi

Re: [R] How do I sample "cases" within a matrix?

2009-04-29 Thread jim holtman
If you just want to shuffle the row around, this should do it. By limiting the number of samples, you can get a smaller matrix: > pla<- c(10, 9, 6, 5, 3) #abundance of pla species > pol<- c(14, 10, 9, 4, 2) #abundance of pol species > m<-pla%*%t(pol) #matrix of interactions > m[sample(nrow(m)),]

[R] Normal distribution with R

2009-04-29 Thread guox
If we knew two pth quantiles for a normal distribution, is it possible that we can find mean and sigma for the normal distribution using R? Let x ~ norm(mean, sigma). Suppose that qnorm(0.9,mean,sigma) and qnorm(0.1,mean,sigma) are known. Can we find mean and sigma using R? Thanks, -james _

Re: [R] Bounded memory ANOVA

2009-04-29 Thread Thomas Lumley
If it is a fixed-effects ANOVA you can just use biglm(). Otherwise you could use biglm() to fit the necessary sequences of models to give the RSS that you need for the F-tests. -thomas On Tue, 28 Apr 2009, Hardi wrote: Hi, I'm using aov() to analyze the data and get the rank of fa

Re: [R] Out of memory issue

2009-04-29 Thread Thomas Lumley
On Tue, 28 Apr 2009, Neotropical bat risk assessments wrote: Hi again all, I can read all of the data is in CSV format with a header row and with 1,200,240 rows. I can do all the plots and ggplot2 has no problems. Seems to be a problem with the MASS package??? It seems that the cont

[R] How do I sample "cases" within a matrix?

2009-04-29 Thread Silvia Lomascolo
Hi R community, I am trying to obtain a sample from a matrix but sample(my.matrix) doesn't do what I need. I have a matrix of 1287 interactions between the species in columns and the species in rows and I want to obtain a smaller matrix with say, 800 interactions, that may or may not have the same

[R] trouble with rgl on opensuse 11.1

2009-04-29 Thread Erin Hodgess
Dear R People: I upgraded to Open Suse 11.1 and am having trouble with the rgl package, which I need for other applications. Here is the install output: > install.packages("rgl",depen=TRUE) --- Please select a CRAN mirror for use in this session --- Loading Tcl/Tk interface ... done trying URL '

[R] Installing/using "glars" package --- Error in library(glars) : 'glars' is not a valid installed package

2009-04-29 Thread lara harrup (IAH-P)
Hi all I seem to have fallen at the first hurdle with my analysis, I have a set of binary disease outbreak data linked to a large number of landscape metrics variables and environmental variables which I would like to as predictor variables in a Least Angle Logistic Regression using the glars.fit

Re: [R] Newbie R question PART2

2009-04-29 Thread Martin Morgan
Tena Sakai wrote: > Hi, > > Many thanks to Wacek Kusnierczyk and Ted Harding. > > I learned 3 new tricks. (Not bad for a newbie?) > > $ R --silent --no-save < barebone.R > $ R --quiet --no-save < barebone.R > $ R --slave < barebone.R > > With slight differences, they all do what I wanted

Re: [R] if condition doesn't evaluate to True/False

2009-04-29 Thread ml-r-help
Petr PIKAL wrote: > Hi > > r-help-boun...@r-project.org napsal dne 29.04.2009 17:05:01: > >> see >> ?is.null >> >> e.g. >> if( is.null(sub_grp_whr_cls_data[sbgrp_no, 1]) ) >> { >> your code >> } > > It probably will not work as > > sub_grp_whr_cls_data[sbgrp_no,1]=="NULL" > > implicates tha

Re: [R] if condition doesn't evaluate to True/False

2009-04-29 Thread Bert Gunter
test <- list(NULL) Bert Gunter Nonclinical Biostatistics 467-7374 > -Original Message- > From: r-help-boun...@r-project.org > [mailto:r-help-boun...@r-project.org] On Behalf Of Petr PIKAL > Sent: Wednesday, April 29, 2009 8:21 AM > To: ml-r-h...@epigenomics.com > Cc: r-h...@stat.math.e

[R] what happens if a function removes an external (global) variable ?

2009-04-29 Thread mauede
My program consists of a number of functions and a main script. It loops through many time series analyzing one at a time. I have declared a number of arrays and scalar variables in the main script namespace (using C++ terminology) because those data structures ar shared by many functions. let

Re: [R] if condition doesn't evaluate to True/False

2009-04-29 Thread Petr PIKAL
Hi r-help-boun...@r-project.org napsal dne 29.04.2009 17:05:01: > see > ?is.null > > e.g. > if( is.null(sub_grp_whr_cls_data[sbgrp_no, 1]) ) > { > your code > } It probably will not work as sub_grp_whr_cls_data[sbgrp_no,1]=="NULL" implicates that there is character value "NULL". I am not s

Re: [R] Kolmogorov-Smirnov test

2009-04-29 Thread Richardson, Patrick
This is the third homework question you have asked the list to do for you. How many more should we expect? The posting guide is pretty clear in that: " Basic statistics and classroom homework: R-help is not intended for these." -Original Message- From: r-help-boun...@r-project.org [m

Re: [R] Kolmogorov-Smirnov test

2009-04-29 Thread Andrew Dolman
help.search("kolmogorov") ?ks.test andydol...@gmail.com 2009/4/29 mathallan > > I got a distribution function and a empirical distribution function. How do > I > make to Kolmogorov-Smirnov test in R. > > Lets call the empirical distribution function >Fn on [0,1] > and the

[R] Odp: if condition doesn't evaluate to True/False

2009-04-29 Thread Petr PIKAL
Hi you put your problem in absolutely messy state r-help-boun...@r-project.org napsal dne 29.04.2009 16:16:55: > Hi friends, > Please help me with this bug. > > *Bug in my code:* > > In this variable sub_grp_whr_cls_data[sbgrp_no,1] I store the where > clause.every sub group has a where condit

Re: [R] if condition doesn't evaluate to True/False

2009-04-29 Thread ml-r-help
see ?is.null e.g. if( is.null(sub_grp_whr_cls_data[sbgrp_no, 1]) ) { your code } Moumita Das wrote: > Hi friends, > Please help me with this bug. > > *Bug in my code:* > > In this variable sub_grp_whr_cls_data[sbgrp_no,1] I store the where > clause.every sub group has a where condition linked

Re: [R] The .tex version of the manual in foo.Rcheck

2009-04-29 Thread Uwe Ligges
Berwin A Turlach wrote: G'day Uwe, On Wed, 29 Apr 2009 11:03:43 +0200 Uwe Ligges wrote: you can also take a source package an run R CMD Rd2dvi --no-clean packageName on it and you will get a temporary directory with the TeX sources in it. Which is fine for manual processing and when don

[R] Simulate.lme in nlme package

2009-04-29 Thread Jun Shen
Hi, everyone (maybe especially for Dr. Bates :), I was trying to simulate from an lme object by using simulate.lme(object, nsim=10). Instead of dependent variables, I got LogLikelihood something like. infologLik 10 -336.4174 20 -332.2199 30 -337.8076 40 -339.7027 50 -338

[R] Kolmogorov-Smirnov test

2009-04-29 Thread mathallan
I got a distribution function and a empirical distribution function. How do I make to Kolmogorov-Smirnov test in R. Lets call the empirical distribution function >Fn on [0,1] and the distribution function >F on [0,1] ks.test( ) thanks for the help -- View this

Re: [R] Mailinglist; get a copy of all own messages

2009-04-29 Thread Sarah Goslee
Even if you have the mailing list options set so that you are sent copies of your own posts, gmail "hides" them for you. http://groups.google.com/group/Gmail-Help-Message-Delivery-en/browse_thread/thread/e7716ab04941c383?pli=1 It has nothing to do with the mailing list manager. The original quer

Re: [R] Mailinglist; get a copy of all own messages

2009-04-29 Thread Wacek Kusnierczyk
Sarah Goslee wrote: > It's gmail, not the mailing list. oops? it's a typical property of a mailing list manager that allows a subscriber to decide whether s/he want to receive copies of h{er,is} own posts. for r-help, you should be able to login at https://stat.ethz.ch/mailman/options/r-h

Re: [R] boxplot - margin settings

2009-04-29 Thread Antje
I knew the solution would be kind of simple... Thanks a lot, Sarah! Sarah Goslee schrieb: boxplot() isn't passing extra parameters in the way you'd expect. If you set par() first, it works fine. mar.orig <- par()$mar # save the original values par(mar = c(20,4,4,4)) # set your new values boxp

[R] if condition doesn't evaluate to True/False

2009-04-29 Thread Moumita Das
Hi friends, Please help me with this bug. *Bug in my code:* In this variable sub_grp_whr_cls_data[sbgrp_no,1] I store the where clause.every sub group has a where condition linked with it. Database1 Where clause was not found for a particular subgroup, sub_grp_whr_cls_data[sbgrp_no,1] value

Re: [R] boxplot - margin settings

2009-04-29 Thread Sarah Goslee
boxplot() isn't passing extra parameters in the way you'd expect. If you set par() first, it works fine. mar.orig <- par()$mar # save the original values par(mar = c(20,4,4,4)) # set your new values boxplot(data, las = 2) par(mar = mar.orig) # put the original values back Sarah On Wed, Apr 29, 2

[R] Help with RExcel (running code)

2009-04-29 Thread benn fine
Hello: First, RExcel completely rocks! Hat tip to the development team. However, I don't understand something very basic about it. Suppose I put the following code in two cells and choose the Run Code option plot(runif(20),runif(20)) text(.5,.5,"Hello") I get the expected plot. HOWEVER, if I

Re: [R] how to word-wrap text in labels in plots?

2009-04-29 Thread Hans Ekbrand
Thanks to Jim and Eik! I really appreciate your help, and I think can use your suggestions and perhaps write a wrapper for plot that integrates them. -- Hans Ekbrand (http://sociologi.cjb.net) Q. What is that strange attachment in this mail? A. My digital signature, see www.gnupg.org for info o

[R] boxplot - margin settings

2009-04-29 Thread Antje
Hi there, I'm trying to solve a boxplot problem (should be simple, but I cannot find the solution...): data <- list("long_name1_xxx" = rnorm(100), "long_name2_yy" = rnorm(200)) boxplot(data , las = 2, mar = c(20,4,4,4)) Why does the margin not chang

Re: [R] correlation coefficient

2009-04-29 Thread Dimitri Liakhovitski
Just another opinion about R^2 coming from the field of US Psychology research and business: The first and foremost technique taught in Psychology Departments in subfields where experimental designs are rarely possible (i.e., social psychology, personality psychology, developmental psychology, Indu

Re: [R] reading csv file : blanks

2009-04-29 Thread Dimitri Liakhovitski
When you read in a .csv file with some empty cells using read.csv, there is no need to specify anything - empty cells will be recorded as NAs automatically: try: data1<-read.csv("oa_2006.csv") Dimitri On Wed, Apr 29, 2009 at 7:54 AM, Jim Lemon wrote: > Nattu wrote: >> >> Hi, >> >> I have a co

Re: [R] Mailinglist; get a copy of all own messages

2009-04-29 Thread Sarah Goslee
It's gmail, not the mailing list. Gmail stores your mailing list messages under "Sent mail" and I at least haven't found any way to convince it to filter them or store them elsewhere. If you reply to an earlier message, your reply should appear in the proper place, but there doesn't seem to be any

[R] modified Struve functions

2009-04-29 Thread Ranjan Maitra
Dear all, Is there an R package which calculates the modified Struve function (StruveL)? I was not able to find anything apt with a RSiteSearch so it does not appear to have been asked in the list. Many thanks and best wishes, Ranjan __ R-help@r-proje

[R] Mailinglist; get a copy of all own messages

2009-04-29 Thread Martin Batholdy
Hi, I tried to change my settings of the mailing-list, so that I get my own message again from the mailing-list. But it doesn't work - I don't get a copy of my own email. Does anyone know how you can change that? thanks for any help! __ R-hel

Re: [R] Newbie R question PART2

2009-04-29 Thread Ista Zahn
Hi Tena, I recommend rapache for building websites with R. See http://biostat.mc.vanderbilt.edu/rapache/ -Ista > -- Forwarded message -- > From: "Tena Sakai" > To: , > Date: Tue, 28 Apr 2009 15:04:53 -0700 > Subject: Re: [R] Newbie R question PART2 > Hi, > > Many thanks to Wacek

Re: [R] Newbie R question PART2

2009-04-29 Thread Stefan Evert
the little r comes from littler [1]. it doesn't claim to be larger than it is. [1] http://dirk.eddelbuettel.com/code/littler.html Unless you're working on a Mac or Windows (if I'm not mistaken about case handling there), where it will just overwrite the standard R interpreter. :-( Chee

Re: [R] how to word-wrap text in labels in plots?

2009-04-29 Thread Jim Lemon
Hans Ekbrand wrote: c <- structure(c(2L, 2L, 1L, 3L, 4L, 2L, 3L, 2L, 3L, 2L, 5L), .Label = c("foo", + "bar", "a really really long variable label mostly here to show the need of word-wrapping text in labels", + "a not so important value", "baz"), class = "factor") plot(c) Is there a way to get

Re: [R] correlation coefficient

2009-04-29 Thread Peter Flom
Dieter Menne wrote >I noted the "and" was misleading. Read: Good journals like Lancet, >New English and many British Journal of XXX really help you to do >better. I am one of the statistical editors for PLoS Medicine, and I try to help people do better; often, the people take my advice. Somet

Re: [R] reading csv file : blanks

2009-04-29 Thread Jim Lemon
Nattu wrote: Hi, I have a comma seperated data file which has blanks in it. I am trinying to import it to R using data1<-read.csv("oa_2006.csv", header = TRUE, sep = ",", quote="\"", dec=".") I want the missing values to be "NA". instead R reads them as "U". Any idea why this happens ? Hi

Re: [R] how to word-wrap text in labels in plots?

2009-04-29 Thread Eik Vettorazzi
Hi Hans, strwrap is your friend. "\n" inserts a cr in a line of text. wordwrap<-function(x,len) paste(strwrap(x,width=len),collapse="\n") par(mar=c(11,3,2,1)) tmp<-plot(c,axes=F) axis(2) axis(1,at=tmp,labels=sapply(levels(c),wordwrap,len=15),padj=1) box() For unique abbreviations see ?abbreviate

Re: [R] Problem with survival

2009-04-29 Thread Frank E Harrell Jr
Terry Therneau wrote: It is likely a problem with survival, since 2.9 merged in a large number of changes that had occured in my source tree that had not propogated to the R tree my test suite doesn't have a test for this particular case (2 factors) and - Murphy's

Re: [R] The .tex version of the manual in foo.Rcheck

2009-04-29 Thread Berwin A Turlach
G'day Uwe, On Wed, 29 Apr 2009 11:03:43 +0200 Uwe Ligges wrote: > you can also take a source package an run > > R CMD Rd2dvi --no-clean packageName > > on it and you will get a temporary directory with the TeX sources in > it. Which is fine for manual processing and when done once or twice, b

Re: [R] legend with small colored boxes

2009-04-29 Thread Christophe Dutang
I thought I have tried to pass a vector of "colors" and that it did not work.. Thanks for all! Christophe Le 29 avr. 09 à 12:16, Jim Lemon a écrit : Christophe Dutang wrote: Hi all, I tried to a nice legend with small boxes filled with the colors used for the plots. But it does nor wor

[R] how to word-wrap text in labels in plots?

2009-04-29 Thread Hans Ekbrand
c <- structure(c(2L, 2L, 1L, 3L, 4L, 2L, 3L, 2L, 3L, 2L, 5L), .Label = c("foo", + "bar", "a really really long variable label mostly here to show the need of word-wrapping text in labels", + "a not so important value", "baz"), class = "factor") plot(c) Is there a way to get the long variable la

  1   2   >