Re: [R] SEM - standardized path coefficients?

2007-09-19 Thread Steve Powell
Dear list members, In sem, std.coef() will give me standardized coefficients from a sem model. But is there a trick so that path.diagram can use these coefficients rather than unstandardized ones? Thanks Steve Powell From: John Fox Date: Wed 28 Feb 2007 - 14:37:22 GMT Dear Tim, See ?standardi

[R] lmer using quasibinomial family

2007-09-19 Thread Alexandre Courtiol
Dear all, I try to consider overdispersion in a lmer model. But using family=quasibinomial rather than family=binomial seems to change the fit but not the result of an anova test. In addition if we specify test="F" as it is recomanded for glm using quasibinomial, the test remains a Chisq test. Are

Re: [R] xyplot question

2007-09-19 Thread Wayne.W.Jones
The following link is an excellent reference which gives R code for making different plots in R. http://addictedtor.free.fr/graphiques/thumbs.php Is it something like this you want: http://addictedtor.free.fr/graphiques/RGraphGallery.php?graph=52 The code can be found to do this on the webp

Re: [R] recommended package/docs for analyzing multiple choice tests

2007-09-19 Thread Dimitris Rizopoulos
In ltm (version 0.8-1) you may also check the following functions: descript(), cronbach.alpha(), mult.choice() I hope it helps. Best, Dimitris ps, you may find more information about `ltm' as well as sample analysis files at the Rwiki page: http://wiki.r-project.org/rwiki/doku.php?id=packages

[R] independent plotting of predicted terms with gamlss

2007-09-19 Thread Nikolaus Umlauf
Hi! I want to create a plot of a predicted term similar to the function term.plot() in the gamlss package. I have tried several options, but I could not work it out so far... Thank you for your help! Nikolaus here is my example: library(gamlss) data(rent) attach(rent) # Estimating some model

[R] x and y coordinates (Rfwdmv Package)

2007-09-19 Thread J. Däbritz
Hello R users, before asking my question I'd like to stress that I'm an (absolute) beginner in using R, but enthused about the incredible possibilities of it. So I hope my questions are not too stupid. Here's my problem: I have a dataset with skewed distributions. In order to obtain approx multi

[R] x and y coordinates (Rfwdmv Package)

2007-09-19 Thread gigis.mail
Hello R users, before asking my question I'd like to stress that I'm an (absolute) beginner in using R, but enthused about the incredible possibilities of it. So I hope my questions are not too stupid. Here's my problem: I have a dataset with skewed distributions. In order to obtain approx multi

Re: [R] handling multiple files; was: R advice

2007-09-19 Thread Uwe Ligges
Handling multiple files automatically is easy in R and has been answered several times on this list: please pok up the archives as suggested in the posting guide to this list which also asks you to use a sensible subject line. Additionally, there is a FAQ entry called "How can I save the result

[R] glmpath error

2007-09-19 Thread Tirthadeep
Hi, I am using glampath package for L1 regularized logistic regression. I got the following error messege. > model.fit <- glmpath(train.data[,1:20], train.data$RES, family=binomial) Error in one %*% x : requires numeric matrix/vector arguments where train.data is a 700X21 matrix and 21st colum

Re: [R] glmpath error

2007-09-19 Thread Duncan Murdoch
Tirthadeep wrote: > Hi, > > I am using glampath package for L1 regularized logistic regression. I got > the following error messege. > > >> model.fit <- glmpath(train.data[,1:20], train.data$RES, family=binomial) >> > Error in one %*% x : requires numeric matrix/vector arguments > > where t

[R] layout function for several plots

2007-09-19 Thread marcg
Dear all I try to print 9 plots on a page, arranged as the code shows below. nf <- layout(matrix(c(1,0,2,0,0,3,0,4,0,5,0,6,0,0,0,0,7,0,8,9), 10,2)) layout.show(nf) but when I try to plot, an error message Fehler in plot.new() : Grafikränder zu groß appears to verify p.e. with plot(runif(10:1

Re: [R] glmpath error

2007-09-19 Thread Tirthadeep
Then what is the solution? Duncan Murdoch-2 wrote: > > Tirthadeep wrote: >> Hi, >> >> I am using glampath package for L1 regularized logistic regression. I got >> the following error messege. >> >> >>> model.fit <- glmpath(train.data[,1:20], train.data$RES, family=binomial) >>> >> Err

[R] CRAN mirror for R in India: new one at WBUT, how do we get listed in the CRAN website?

2007-09-19 Thread Arin Basu
Dear All, Folks at the West Bengal University of Technology has set up a mirror to distribute R and associated packages. Here is the URL: http://mirror.wbut.ac.in/CRAN This will be helpful for R users in South Asia and the adjoining countries. I have yet to see the site featured in the CRAN list

Re: [R] SEM - standardized path coefficients?

2007-09-19 Thread John Fox
Dear Steve, My intention was to provide this flexibility via the parameters argument to path.diagram.sem(), but it isn't implemented. Here's a version that should do what you want: - snip path.diagram.sem <- function (model, out.file, min.rank = NULL, max.rank =

[R] Running tcltk From a batch file

2007-09-19 Thread Samuel Kemp
Hi, I am trying to run some simple tktcl code ## in a file called test.R require(tcltk) tt <- tktoplevel() OK.but <- tkbutton(tt,text="OK",command=function()tkdestroy(tt)) tkgrid(OK.but) tkfocus(tt) Using a batch file with the command Rterm < test.R > testOutput.Rout --slave The GUI pops u

Re: [R] CRAN mirror for R in India: new one at WBUT, how do we get listed in the CRAN website?

2007-09-19 Thread Vladimir Eremeev
http://cran.r-project.org/mirror-howto.html Arin Basu-3 wrote: > > Dear All, > > Folks at the West Bengal University of Technology has set up a mirror to > distribute R and associated packages. Here is the URL: > > http://mirror.wbut.ac.in/CRAN > > This will be helpful for R users in South A

Re: [R] function on factors - how best to proceed

2007-09-19 Thread Gustaf Rydevik
On 9/19/07, Karin Lagesen <[EMAIL PROTECTED]> wrote: > "Gustaf Rydevik" <[EMAIL PROTECTED]> writes: > > > > The second warning message tells you that: > > 2: the condition has length > 1 and only the first element will be > > used in: if (terminus > origin) > > > > You are comparing two vectors,

[R] apply

2007-09-19 Thread Roger Mason
Hello, I have a list of filenames extracted from a data-frame thus: files <- main$file e.g. file[[1]] returns [1] Ca00Mn48_0.gout 4702 Levels: Ca00Mn48_0.gout Ca01Mn47_0.gout Ca01Mn47_1.gout ... Ca48Mn00_0.gout I want to extract the substring that contains the two digits after "Ca". This wor

Re: [R] Running tcltk From a batch file

2007-09-19 Thread Jonne Zutt
Hi Samuel, An easy solution is the following. Let the R script wait until a certain variable (ok_to_quit) got changed. Hope it helps, Jonne. ## in a file called test.R quit <- function() { .Tcl("set ok_to_quit 1") tkdestroy(tt) } require(tcltk) tt <<- tktoplevel() OK.but <- tkbutton(tt,text

Re: [R] apply

2007-09-19 Thread Dimitris Rizopoulos
it also works with vectors, e.g. x <- c("Ca00Mn48_0.gout", "Ca01Mn47_0.gout", "Ca01Mn47_1.gout", "Ca48Mn00_0.gout") substr(x, 3, 4) I hope it helps. Best, Dimitris Dimitris Rizopoulos Ph.D. Student Biostatistical Centre School of Public Health Catholic University of Leuven Address: Kapu

Re: [R] Running tcltk From a batch file

2007-09-19 Thread Peter Dalgaard
Jonne Zutt wrote: > Hi Samuel, > > An easy solution is the following. Let the R script wait until a certain > variable (ok_to_quit) got changed. > > Hope it helps, > Jonne. > > ## in a file called test.R > quit <- function() { > .Tcl("set ok_to_quit 1") > tkdestroy(tt) > } > > require(tcltk) >

[R] (no subject)

2007-09-19 Thread marcg
Dear all I try to print 9 plots on a page, arranged as the code shows below. nf <- layout(matrix(c(1,0,2,0,0,3,0,4,0,5,0,6,0,0,0,0,7,0,8,9), 10,2)) layout.show(nf) but when I try to plot, an error message Fehler in plot.new() : Grafikränder zu groß appears to verify p.e. with plot(runif(10:1

Re: [R] Cox regression and p-values

2007-09-19 Thread Terry Therneau
Fisher's "exact" test is for comparing two proportions, which is a completely different problem than Cox regression, and so the test has no relevance to this problem. It has, however, sparked a large literature of debate; already alluded to by many of the responses. The tests in the coxph

[R] Robust or Sandwich estimates in lmer2

2007-09-19 Thread Abdus Sattar
Dear R-Users: I am trying to find the robust (or sandwich) estimates of the standard error of fixed effects parameter estimates using the package "lmer2". In model-1, I used "robust=TRUE" on the other, in model-2, I used "robust=FALSE". Both models giving me the same estimates. So my question i

[R] Memory Issue

2007-09-19 Thread Yoni Stoffman
Hi, I'm new to R and there is something I'm missing about how it uses memory. I'm doing a simple query (using RODBC package) and immediately set the data.frame to null close the connection/channel and explicitly call to the garbage collector (gc()) however when I look in the task monitor I see bo

Re: [R] glmpath error

2007-09-19 Thread Duncan Murdoch
On 9/19/2007 7:46 AM, Tirthadeep wrote: > Then what is the solution? The same method you used for the other columns: train.data[,21] Duncan Murdoch > > > > > Duncan Murdoch-2 wrote: >> >> Tirthadeep wrote: >>> Hi, >>> >>> I am using glampath package for L1 regularized logistic regression.

Re: [R] glmpath error

2007-09-19 Thread Peter Ehlers
Is train.data a *numeric* matrix? Peter Ehlers Tirthadeep wrote: > Then what is the solution? > > > > > Duncan Murdoch-2 wrote: >> Tirthadeep wrote: >>> Hi, >>> >>> I am using glampath package for L1 regularized logistic regression. I got >>> the following error messege. >>> >>> model

[R] function on factors - how best to proceed

2007-09-19 Thread Karin Lagesen
Sorry about this one being long, and I apologise beforehand if there is something obvious here that I have missed. I am new to creating my own functions in R, and I am uncertain of how they work. I have a data set that I have read into a data frame: > gctable[1:5,] refseq geometry X60_origi

[R] ChiSquare-Test

2007-09-19 Thread Birgit Lemcke
Hello all you helpful people out there! I am stil R Beginner using R 2.5.1 on a Apple Power Book G4 with Mac OS X 10.4.10 . I have two tabels like this: MalTabChi X1 X4 X6 X8 X10 X14 X21 X24 X29 X38 X43 X50 X67 X76 X78 X80 X82 X84 Anth_cap 1 1 1 165

Re: [R] glmpath error

2007-09-19 Thread Prof Brian Ripley
On Wed, 19 Sep 2007, Duncan Murdoch wrote: > On 9/19/2007 7:46 AM, Tirthadeep wrote: >> Then what is the solution? > > The same method you used for the other columns: > > train.data[,21] However, the error message is about the first argument (x) and not NULL for the second argument (and applying

[R] By() with method = spearman

2007-09-19 Thread Doran, Harold
I have a data set where I want the correlations between 2 variables conditional on a students grade level. This code works just fine. by(tmp[,c('mtsc07', 'DCBASmathscoreSPRING')], tmp$Grade, cor, use='complete', method='pearson') However, this generates an error by(tmp[,c('mtsc07', 'DCBASmathsc

[R] Strange behaviour of lars method

2007-09-19 Thread Wiebke Timm
Hi! When I apply the lars (least-angle-regression) method to my data (3655 features, only 355 data points, no I did not mistype), I observe a strange behaviour: 1) The beta values tend to grow into real high values quite fast up to a point where they overflow and get negative. The overflow

Re: [R] By() with method = spearman

2007-09-19 Thread Chuck Cleland
Doran, Harold wrote: > I have a data set where I want the correlations between 2 variables > conditional on a students grade level. > > This code works just fine. > > by(tmp[,c('mtsc07', 'DCBASmathscoreSPRING')], tmp$Grade, cor, > use='complete', method='pearson') > > However, this generates an

Re: [R] layout function for several plots

2007-09-19 Thread R Help
I can't read what your error message, but on mine I get the error: "Error in plot.new(): margins too large", which is happening because the default margins do not have enough space. You can reduce the margins with using par par(mar=c(0,0,0,0)) Which will let plot.new() work. I hope this helps.

Re: [R] Robust or Sandwich estimates in lmer2

2007-09-19 Thread Sundar Dorai-Raj
Abdus Sattar said the following on 9/19/2007 7:03 AM: > Dear R-Users: > > I am trying to find the robust (or sandwich) estimates of the standard error > of fixed effects parameter estimates using the package "lmer2". In model-1, I > used "robust=TRUE" on the other, in model-2, I used "robust=FAL

Re: [R] By() with method = spearman

2007-09-19 Thread Doran, Harold
Thanks, Chuck. Seems odd though, doesn't it? There must be something with my data set. But, I don't have any clue what it might be since I can compute pearson using by() and I can subset and actually compute spearman using just cor() > -Original Message- > From: Chuck Cleland [mailto:[EMA

Re: [R] By() with method = spearman

2007-09-19 Thread Doran, Harold
I still get an error > tmp$Grade <- factor(tmp$Grade) > lapply(split(tmp, f = tmp$Grade), function(x){cor(x[,c("mtsc07","DCBASmathscoreSPRING")], use='complete', + method='spearman')}) Error in cor(x[, c("mtsc07", "DCBASmathscoreSPRING")], use = "complete", : 'x' is empty I noticed tmp

[R] Row-by-row regression on matrix

2007-09-19 Thread murali . menon
Folks, I have a 3000 x 4 matrix (y), which I need to regress row-by-row against a 4-vector (x) to create a matrix lm.y of intercepts and slopes. To illustrate: y <- matrix(rnorm(12000), ncol = 4) x <- c(1/12, 3/12, 6/12, 1) system.time(lm.y <- t(apply(y, 1, function(z) lm(z ~ x)$coefficient)))

Re: [R] Robust or Sandwich estimates in lmer2

2007-09-19 Thread Doran, Harold
This has come up before and I'll again ask the question "why would you want robust standard errors in lmer"? Traditional econometric thinking suggests that there is model mispecification if OLS is used and there is a violation to the assumption of independence. So, one may still get the point estim

Re: [R] By() with method = spearman

2007-09-19 Thread Ivar Herfindal
Hello It seems like method="pearson" accept missing values, that is, none complete cases, and only generate correlation coefficients of NA, while using method="spearman" gives and error message. try e.g. testdata <- cbind.data.frame(gr=rep(letters[1:4], each=5), aa=rnorm(20), bb=rnorm(20)) te

Re: [R] By() with method = spearman

2007-09-19 Thread Sundar Dorai-Raj
Hi, Harold, In cases like this I usually add some print info to the function. E.g. tmp$Grade <- factor(tmp$Grade) lapply(split(tmp, f = tmp$Grade), function(x) { z <- x[,c("mtsc07","DCBASmathscoreSPRING")] print(levels(factor(z$Grade))) print(summary(z))

[R] micEcon: selection(,method="ml") . Predict method?

2007-09-19 Thread Werner Wernersen
Hi, as I read, maximum likelihood is the better method for estimating selection-biased models. But I also want to predict from that model. Is there any predict method for the selection function when using maximum likelihood estimation in micEcon? I couldn't find any. Many thanks, Werner __

Re: [R] Row-by-row regression on matrix

2007-09-19 Thread Sundar Dorai-Raj
[EMAIL PROTECTED] said the following on 9/19/2007 9:50 AM: > Folks, > > I have a 3000 x 4 matrix (y), which I need to regress row-by-row against a > 4-vector (x) to create a > matrix lm.y of intercepts and slopes. To illustrate: > > y <- matrix(rnorm(12000), ncol = 4) > x <- c(1/12, 3/12, 6/12,

Re: [R] Row-by-row regression on matrix

2007-09-19 Thread Chuck Cleland
[EMAIL PROTECTED] wrote: > Folks, > > I have a 3000 x 4 matrix (y), which I need to regress row-by-row against a > 4-vector (x) to create a > matrix lm.y of intercepts and slopes. To illustrate: > > y <- matrix(rnorm(12000), ncol = 4) > x <- c(1/12, 3/12, 6/12, 1) > > system.time(lm.y <- t(appl

Re: [R] Robust or Sandwich estimates in lmer2

2007-09-19 Thread Thomas Lumley
On Wed, 19 Sep 2007, Doran, Harold wrote: > This has come up before and I'll again ask the question "why would you > want robust standard errors in lmer"? And I'll again answer: using lmer() does not automatically guarantee correct model specification, either for the correlation structure or for

Re: [R] Row-by-row regression on matrix

2007-09-19 Thread Charles C. Berry
> system.time( lm( t(y) ~ x ) ) user system elapsed 0.008 0.000 0.010 On Wed, 19 Sep 2007, [EMAIL PROTECTED] wrote: > Folks, > > I have a 3000 x 4 matrix (y), which I need to regress row-by-row against a > 4-vector (x) to create a > matrix lm.y of intercepts and slopes. To illust

[R] How to pass a string as an argument to a function?

2007-09-19 Thread Gang Chen
I want to pass a predefined string ww ("fa*fb+fc") to function lme so that I can run > lme(y ~ fa*fb+fc, random = ~1|subj, model) I've tried something like > lme(y ~ paste(ww), random = ~1|subj, model) and > lme(y ~ sprintf(ww), random = ~1|subj, model) but both give me the following

Re: [R] Robust or Sandwich estimates in lmer2

2007-09-19 Thread Abdus Sattar
Hi Doran, My interests to estimate fixed effects parameters in a mixed model (not the random effects parameters) and, in addition, in the model there are some nuisace parameters. For this estimation I am using pseudo-maximum likelihood methods. First I am estimating nuisance parameters then us

Re: [R] How to pass a string as an argument to a function?

2007-09-19 Thread Vladimir Eremeev
lme(as.formula(paste("y~",ww)),random=~1|subj,model) Gang Chen-3 wrote: > > I want to pass a predefined string ww ("fa*fb+fc") to function lme so > that I can run > > > lme(y ~ fa*fb+fc, random = ~1|subj, model) > > There must be a simple way to do this. Any help? > > Thanks, > Gang >

Re: [R] How to pass a string as an argument to a function?

2007-09-19 Thread Gang Chen
Yes, as.formula is the magic tool! Thanks a lot... Gang On Sep 19, 2007, at 2:00 PM, Vladimir Eremeev wrote: > > lme(as.formula(paste("y~",ww)),random=~1|subj,model) > > > Gang Chen-3 wrote: >> >> I want to pass a predefined string ww ("fa*fb+fc") to function lme so >> that I can run >> >>> lme(

Re: [R] layout function for several plots

2007-09-19 Thread Greg Snow
Using ann=F just tells R not to put anything in the margins, it does not reduce the size of the margins. You need to reduce the margin size using par(mar= ...) with appropriate values. You can then shrink what goes in the margins rather than not plotting it at all (though that is a good first

Re: [R] function on factors - how best to proceed

2007-09-19 Thread Gustaf Rydevik
On 9/19/07, Gustaf Rydevik <[EMAIL PROTECTED]> wrote: > On 9/19/07, Karin Lagesen <[EMAIL PROTECTED]> wrote: > > "Gustaf Rydevik" <[EMAIL PROTECTED]> writes: > > > > > > > The second warning message tells you that: > > > 2: the condition has length > 1 and only the first element will be > > > used

[R] Smooth line in graph

2007-09-19 Thread Nestor Fernandez
Hi, I’m trying to get smooth curves connecting points in a plot using "spline" but I don’t get what I whant. Eg.: x<-1:5 y <- c(0.31, 0.45, 0.84, 0.43, 0.25) plot(x,y) lines(spline(x,y)) Creates a valley between the first and second points, then peaks at 3rd, and another valley between 4th and

Re: [R] layout function for several plots

2007-09-19 Thread Prof Brian Ripley
On Wed, 19 Sep 2007, Greg Snow wrote: > Using ann=F just tells R not to put anything in the margins, it does not > reduce the size of the margins. You need to reduce the margin size > using par(mar= ...) with appropriate values. You can then shrink what > goes in the margins rather than not p

Re: [R] Smooth line in graph

2007-09-19 Thread Katharine Mullen
how about: require(splines) x<-1:5 y <- c(0.31, 0.45, 0.84, 0.43, 0.25) yy <-predict(interpSpline(x, y)) plot(x, y) lines(yy) Katharine Mullen mail: Department of Physics and Astronomy, Faculty of Sciences Vrije Universiteit Amsterdam, de Boelelaan 1081 1081 HV Amsterdam, The Netherlands ro

Re: [R] Sweave: tables vs matrices

2007-09-19 Thread Markus Jäntti
Gavin Simpson wrote: > On Fri, 2007-09-14 at 11:24 +0100, Robin Hankin wrote: >> Hi Gavin >> >> thanks for that. . . it does 99% of what I wanted. >> I'd forgotten about the na.print argument. >> >> It's considerably nicer than my other solution >> which converted to character, then jj[is.na(jj)] <

Re: [R] Smooth line in graph

2007-09-19 Thread Greg Snow
Try: > lines(spline(x,y, method='n', n=250)) -- Gregory (Greg) L. Snow Ph.D. Statistical Data Center Intermountain Healthcare [EMAIL PROTECTED] (801) 408-8111 > -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of Nestor Fernandez > Sent: Wednesday,

Re: [R] fontsize in mosaic plot lables

2007-09-19 Thread Patrick Connolly
> From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of > [EMAIL PROTECTED] > Sent: Wednesday, 19 September 2007 2:04 p.m. > To: [EMAIL PROTECTED] > Subject: [R] fontsize in mosaic plot lables > > Hi List, > > I am trying unsucessfully to modify the fontsize of lables in mosaic: > >

[R] fCalendar

2007-09-19 Thread stephen bond
is there a straigthforward way to get the holidays for Toronto ? like the function for NYSE e.g. the timeDate class says that setting a finCenter will give the right holidays, but how? thank you very much. stephen __ R-help@r-project.org mailing list

[R] Identify and plotting symbols.

2007-09-19 Thread Rolf Turner
I have been trying, unsuccessfully, to use identify() to (simply) return a list of the indices of points clicked on and overplot (with say a solid dot) each clicked-on point so that I can see where I've been. I.e. I don't want to see the indices printed on the screen; I just want the points

Re: [R] Creating Hmisc labels inside a function

2007-09-19 Thread Frank E Harrell Jr
Steve Powell wrote: > Thanks again Frank for quick reply. > True, > > someobject=2 > Test=function(obj,labe) >{ >label(obj)=labe >#at this point add the line: >obj >} > Test(someobject,"somelabel") > #returns a label. But if you retype > someobject > #the label has gone. Th

[R] Subset any value and blanks

2007-09-19 Thread Spilak,Jacqueline [Edm]
Hi everyone I need help with subseting a data set. In my dataset there is a specific row that will either have a value or be blank. I would like to subset (or split) the dataset into one dataset with the row that has the value and another dataset that has just the blanks. Now the thing is that t

Re: [R] how to find "p" in binomial(n,p)

2007-09-19 Thread Mike Meredith
I think the function you need is 'help.search'; try: help.search("binomial") and look for something obvious in the 'stats' package. A good deal quicker and easier than posting to an internet forum! Cheers, Mike. cathelf wrote: > > Dear all, > > I am trying a find the value "p" in binomial.

Re: [R] how to find "p" in binomial(n,p)

2007-09-19 Thread Ted Harding
On 19-Sep-07 23:04:57, Mike Meredith wrote: > > > I think the function you need is 'help.search'; try: > > help.search("binomial") > > and look for something obvious in the 'stats' package. > A good deal quicker and easier than posting to an internet forum! > > Cheers, Mike. Well ... help.

Re: [R] fontsize in mosaic plot lables

2007-09-19 Thread Alexander.Herr
Thanks Patric, mosaic{vdc} takes gpar parameters. So cex.axis does not work for mosaic(Titanic, pop=FALSE, labeling_args=list(rot_labels=c(bottom=90,top=90),cex.axis=0.5)) or mosaic(Titanic, pop=FALSE, labeling_args=list(rot_labels=c(bottom=90,top=90)),cex.axis=0.5) However, mosaic(Titanic, po

Re: [R] how to find "p" in binomial(n,p)

2007-09-19 Thread Rolf Turner
On 20/09/2007, at 11:04 AM, Mike Meredith wrote: > > I think the function you need is 'help.search'; try: > > help.search("binomial") > > and look for something obvious in the 'stats' package. A good deal > quicker > and easier than posting to an internet forum! > I don't think so. I

Re: [R] function on factors - how best to proceed

2007-09-19 Thread Gustaf Rydevik
On 9/19/07, Karin Lagesen <[EMAIL PROTECTED]> wrote: > > Sorry about this one being long, and I apologise beforehand if there > is something obvious here that I have missed. I am new to creating my > own functions in R, and I am uncertain of how they work. > > I have a data set that I have read int

Re: [R] Subset any value and blanks

2007-09-19 Thread jim holtman
You can use 'split' to create a list of dataframes and then operate on them: Day Month Year Time Hits Misses F.type 1 0101 1999 0600 120 80 0600 2 0101 1999 1015 300 10 3 0101 1999 1216 250 50 1216 4 0101 1999 1649 380 0 5 0101 1999 2132 1100

Re: [R] Need help on "date"

2007-09-19 Thread Jeffrey Robert Spies
Sub uses POSIX-extended regular expressions. It searches for the first argument, the pattern, and replaces it with the second argument in the variable defined by the third argument. [[:digit:]] is a match-any-digit operator; it matches the characters 0-9. The {#} is the interval operator

Re: [R] Factor levels

2007-09-19 Thread Sébastien
Hi Gabor, I am coming back to you about the method you described to me a month ago to define the level order during a read.table call. I initially thought that I would need to apply the 'unique' function on a single column of my dataset, so I only used it after the read.table step (to make my l

[R] What is the preferred method to view a pdf (not a vignette) in a package /doc ?

2007-09-19 Thread morphwj
What is the preferred method to view a pdf (not generated by Sweave so not a vignette) in a package /doc ? Some options are openPDF(Biobase), and the README and Help files. Bill Morphet ATK, Space Launch Systems Postflight Evaluation Eng [[alternative HTML version deleted]] __

Re: [R] how to find "p" in binomial(n,p)

2007-09-19 Thread Charles C. Berry
On Thu, 20 Sep 2007, Rolf Turner wrote: > > On 20/09/2007, at 11:04 AM, Mike Meredith wrote: > >> >> I think the function you need is 'help.search'; try: >> >> help.search("binomial") >> >> and look for something obvious in the 'stats' package. A good deal >> quicker >> and easier than posting to

Re: [R] Factor levels

2007-09-19 Thread Gabor Grothendieck
If you don't know ahead of time how many columns you have and only that they are a mix of numeric and character (to be converted to factor) then you can do this: DF <- read.table(textConnection(Input), header = TRUE, as.is = TRUE) f <- function(x) if (is.character(x)) factor(x, levels = unique(x))

[R] R-related: problem with openvt on Ubuntu 7.04

2007-09-19 Thread bbolker
This is a configuration/OS problem, but it's affecting my use of R ... Whenever I try to open _any_ vignette (as far as I can tell) from within R, I get "Could not get a file descriptor referring to the console", coming from /usr/bin/openvt, which is pointed to by /usr/bin/open, which is cal

Re: [R] Need help on "date"

2007-09-19 Thread Gabor Grothendieck
If you are interested in regular expressions you may also be interested in a solution using the gsubfn package. Here x is the input character string, re is Jeffrey's regular expression and strapply applies the regular expression to x calling the function which is represented in formula notation us

Re: [R] Identify and plotting symbols. [SEC=UNCLASSIFIED]

2007-09-19 Thread Crombie, Joe
Rolf turner wrote: >I have been trying, unsuccessfully, to use identify() to (simply) >return a list of the indices of points clicked on and overplot (with >say a solid dot) each clicked-on point so that I can see where I've >been. I.e. I don't want to see the indices printed on the screen; I

[R] SHLIB problem under Vista

2007-09-19 Thread Anand Patil
Hi all, I'd like to distribute an R package that compiles some (small) C functions every time it's sourced. The relevant code in the top level R script is as follows: system("R CMD SHLIB Selma_extensions.c") if (.Platform$OS.type=="windows") { slash = '\\' dyn.load("Selma_extensions.dll"

Re: [R] fontsize in mosaic plot lables

2007-09-19 Thread Patrick Connolly
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] > Sent: Thursday, 20 September 2007 11:38 a.m. > To: Patrick Connolly; [EMAIL PROTECTED] > Subject: RE: [R] fontsize in mosaic plot lables > > Thanks Patric, > > mosaic{vdc} takes gpar parameters. So cex.axis does not work for OK, my mistake.

Re: [R] Identify and plotting symbols. [SEC=UNCLASSIFIED]

2007-09-19 Thread Crombie, Joe
Or maybe: > while(length(ind <- identify(x,y,n = 1, plot = F))) > points(x[ind], y[ind], pch = 19) (highlights each point as you select it, until you click _stop_) -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Crombie, Joe Sent: Thursday, 20 Septembe