Re: [R] sequence with start and stop positions

2008-08-25 Thread Bill.Venables
There's a kind of way, but it may be more 'elegant' than fast for large sequences > start <- c(1,20,50) > stop <- c(7,25,53) > unlist(mapply(Vectorize(seq), start, stop)) [1] 1 2 3 4 5 6 7 20 21 22 23 24 25 50 51 52 53 Bill Venables http://www.cmis.csiro.au/bill.venables/ -Original

[R] Problem with Integrate for NEF-HS distribution

2008-08-25 Thread xia wang
I need to calcuate the cumulative probability for the Natural Exponential Family - Hyperbolic secant distribution with a parameter theta between -pi/2 and pi/2. The integration should be between 0 and 1 as it is a probability. The function "integrate" works fine when the absolute value of th

[R] sequence with start and stop positions

2008-08-25 Thread Chris Oldmeadow
Hi, I have a vector of start positions, and another vector of stop positions, eg start<-c(1,20,50) stop<-c(7,25,53) Is there a quick way to create a sequence from these vectors? new<-c(1,2,3,4,5,6,7,20,21,22,23,24,25,50,51,52,53) the way Im doing it at the moment is pos<-seq(start[1],sto

Re: [R] R for Windows GUI closes when I try to read.spss

2008-08-25 Thread N'DOYE Souleymane
Hi Roderick, Let me suggest you to save your spss file in txt, and use the read.table or read.csv fonction. That is how I proceed. I hope it will help you, Best regards On Mon, Aug 25, 2008 at 7:39 PM, Roderick Harrison < [EMAIL PROTECTED]> wrote: > ** High Priority ** > > I have been tryin

[R] lattice plotting character woes

2008-08-25 Thread Murray Jorgensen
The following reproducable code shows the setting of my problem: set.seed(260808) n = 50 x = rnorm(n) y = rnorm(n) z = ceiling(runif(n,0,4)) g = runif(n,0,6) G = factor(ceiling(g)) xyplot(y ~ x | G) plsy <- trellis.par.get("plot.symbol") plsy$pch = z trellis.par.set("plot.symbol",plsy) xyplot(y ~

Re: [R] paste: multiple collapse arguments?

2008-08-25 Thread Christos Hatzis
Try this: > paste(paste(x, c(" ","\n"), sep=""), collapse="") [1] "1 2\n3 4\n5 6\n" -Christos Hatzis > -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of remko duursma > Sent: Monday, August 25, 2008 7:37 PM > To: r-help@r-project.org > Subject: [R] pa

Re: [R] A repeated measures, linear mixed model (lme) WITHOUT random effects...

2008-08-25 Thread Doran, Harold
Mark lme is for models with random effects. You need to consult gls() and the corresponding discussion of this function in Pinhiero and Bates. BTW, if you have no random effects it is no longer a mixed model. -Original Message- From: [EMAIL PROTECTED] on behalf of Mark Na Sent: Mon 8/2

Re: [R] Do I need a special package to run LSD tests?

2008-08-25 Thread Rolf Turner
?RSiteSearch On 26/08/2008, at 1:43 PM, michal33 wrote: Hi there, I am trying to run LSD.test(model) I used the following commands: attach(model) m1<- glm(ttl.m ~ site+year, family=quasipoisson, data= model) df<-df.residual(m1) MSerror<-deviance(m1)/df The following command did not work: co

[R] Do I need a special package to run LSD tests?

2008-08-25 Thread michal33
Hi there, I am trying to run LSD.test(model) I used the following commands: attach(model) m1<- glm(ttl.m ~ site+year, family=quasipoisson, data= model) df<-df.residual(m1) MSerror<-deviance(m1)/df The following command did not work: comparison<- LSD.test (ttl.m, site+year, df, MSerror, alpha =

Re: [R] paste: multiple collapse arguments?

2008-08-25 Thread Moshe Olshansky
One possibility is: y <- rep(" ",6) y[6] <- "" y[c(2,4)] <- "\n" res <- paste(paste(x,y,sep=""),collapse="") --- On Tue, 26/8/08, remko duursma <[EMAIL PROTECTED]> wrote: > From: remko duursma <[EMAIL PROTECTED]> > Subject: [R] paste: multiple collapse arguments? > To: r-help@r-project.org > Rec

Re: [R] paste: multiple collapse arguments?

2008-08-25 Thread jim holtman
Try this: > x <- c(1,2,3,4,5,6) > paste(paste(x[seq(1, by=2, length=length(x)/2)], x[seq(2, by=2, > length=length(x)/2)]), collapse="\n") [1] "1 2\n3 4\n5 6" > On Mon, Aug 25, 2008 at 7:36 PM, remko duursma <[EMAIL PROTECTED]> wrote: > > Dear R-helpers, > > I have a numeric vector, like: > > x <

[R] A repeated measures, linear mixed model (lme) WITHOUT random effects...

2008-08-25 Thread Mark Na
Hello, I am trying to fit a repeated measures linear mixed model (using lme) but I don't want to include any random effects. I'm having trouble (even after consulting Pinheiro & Bates 2000) figuring out how to specify the repeated measure without including it in the specification of a random

Re: [R] Two envelopes problem

2008-08-25 Thread Mario
Dear Greg, The problem is that in your code you are creating a distribution where there are only 5-10 and 10-20 pairs. Yes, if I knew that there are only those two types of pairs, and if I new that the probability of each pair was .50, .50, then it is advantageous to switch, but that is becau

[R] paste: multiple collapse arguments?

2008-08-25 Thread remko duursma
Dear R-helpers, I have a numeric vector, like: x <- c(1,2,3,4,5,6) I make this into a string for output to a text file, separated by \n: paste(x, collapse="\n") Is there a way to alternate the collapse argument? So between the first two elements of x, I want to separate by " ", then by "\n",

Re: [R] "unexpected symbol" error?

2008-08-25 Thread Charles C. Berry
On Mon, 25 Aug 2008, Ayesha Gray wrote: Hi. I am getting an "unexpected symbol" error, which I haven't gotten before. I have checked my data and searched the FAQ. I hoping someone has a suggestion on what I might be doing wrong? Thanks! A. Gray Fisheries Consultant Here's the code I'm using

Re: [R] Output to Latex using Memisc almost works

2008-08-25 Thread Martin Elff
On Monday 25 August 2008 (15:36:50), Eelke wrote: > Hello, > I'm using memisc to output regression results to tables and latex. My > problem is that the output that Latex needs must be in between $ $ so that > it is read as formula but memisc does not output the result between $ $. > For example,

Re: [R] Mosaic plot using ggplot2

2008-08-25 Thread hadley wickham
> I would like to know if mosaic plots are supported by ggplot2? If so, > can someone point me to a couple of examples or give me any pointers? Not yet, although I have some plans for them, they're at least 6 months away. Hadley -- http://had.co.nz/ __

[R] "unexpected symbol" error?

2008-08-25 Thread Ayesha Gray
Hi. I am getting an "unexpected symbol" error, which I haven't gotten before. I have checked my data and searched the FAQ. I hoping someone has a suggestion on what I might be doing wrong? Thanks! A. Gray Fisheries Consultant Here's the code I'm using and the error: > 0708smolts <- read.csv(

[R] R for Windows GUI closes when I try to read.spss

2008-08-25 Thread Roderick Harrison
** High Priority ** Cavan - the message I sent to r-help The packages I load are foreign and SPSSDDI and survey - survey won't be used, however, until we're actually trying to calculate the confidence intervals in R Thanks for taking time out to help with this I have been trying to read an SPSS

[R] Mosaic plot using ggplot2

2008-08-25 Thread Rahul Premraj
Hello, I would like to know if mosaic plots are supported by ggplot2? If so, can someone point me to a couple of examples or give me any pointers? Cheers Rahul __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do

Re: [R] Sending "..." to a C external

2008-08-25 Thread Douglas Bates
On Mon, Aug 25, 2008 at 12:28 PM, John Tillinghast <[EMAIL PROTECTED]> wrote: > > > On Sat, Aug 23, 2008 at 11:46 AM, Douglas Bates <[EMAIL PROTECTED]> wrote: > > I don't think it is necessary to go through the agonies of dealing > with the argument list in a .External call., which is what I assume

Re: [R] Survey Design / Rake questions

2008-08-25 Thread Farley, Robert
I don't see this on Nabble, so I'll re-post. Apologies if I missed it.. Still no joy. :-( I see a number of things that bother me. 1) str(ByEBNum$StnTraveld) says "int [1:12] 1 2 3 4 5 6 7 8 9 10 ..." Even though "StnTraveld <- c(as.factor(1:12))" 2) ByEBOn$StnName[1:5] seems t

Re: [R] lattice : using both strip and strip.left

2008-08-25 Thread baptiste auguie
Brilliant! I've just ordered your book to learn more about lattice as its use is quite gripping despite a steep learning curve. Many thanks, baptiste On 25 Aug 2008, at 23:07, Deepayan Sarkar wrote: On Mon, Aug 25, 2008 at 4:47 AM, baptiste auguie <[EMAIL PROTECTED]> wrote: Dear all, I

Re: [R] howto optimize operations between pairs of rows in a single matrix like cor and pairs

2008-08-25 Thread Adaikalavan Ramasamy
Thank you to Jim and Moshe. I will try the Rprof option as well as the running the function to run on columns instead. Thank you. jim holtman wrote: Use Rprof to see where time is being spent. If it is in FUN, then there is probably no way to "optimize" outside of changing the way FUN works.

Re: [R] lattice : using both strip and strip.left

2008-08-25 Thread Deepayan Sarkar
On Mon, Aug 25, 2008 at 4:47 AM, baptiste auguie <[EMAIL PROTECTED]> wrote: > Dear all, > > > I'm routinely using lattice and ggplot2, I wish to create a lattice theme > that looks not too dissimilar to ggplot's defaults so I can include both > graphs in a document with a consistent look. > > To il

Re: [R] lmer4 and variable selection

2008-08-25 Thread Andreas Nord
Bert, Yes, I am aware of that, maybe I was a bit unclear in my previous post. My issue is not at all with interpreting data or deciding on what to do with it. That I am quite capable of doing myself and I could perform the analyses I want to do using other software. However, as I'm trying to imp

Re: [R] Maintaining repeated ID numbers when transposing with reshape

2008-08-25 Thread Adaikalavan Ramasamy
There might be a more elegant way of doing this but here is a way of doing it without reshape(). df <- data.frame( ID=c(1,1,1,1,2,2), TEST=c("A","A","B","C","B","B"), RESULT=c(17,12,15,12,8,9) ) df.s <- split( df, df$ID ) out <- sapply( df.s,

Re: [R] Two envelopes problem

2008-08-25 Thread davidr
There's a pretty thorough discussion on Wikipedia http://en.wikipedia.org/wiki/Two_envelopes_problem Suffice it to say that not everyone agrees. -- David -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Deepayan Sarkar Sent: Monday, August 25, 2008 4:35 PM

Re: [R] Two envelopes problem

2008-08-25 Thread Deepayan Sarkar
On Mon, Aug 25, 2008 at 1:51 PM, Mario <[EMAIL PROTECTED]> wrote: > No, no, no. I have solved the Monty Hall problem and the Girl's problem and > this is quite different. Imagine this, I get the envelope and I open it and > it has £A (A=10 or any other amount it doesn't matter), a third friend gets

Re: [R] Two envelopes problem

2008-08-25 Thread Greg Snow
I think it is like the girl problem, it is a matter of what you condition on (condition on at least 1 girl, or on a specific one being a girl). In your simulations (at least from what I can see), you generate an x from a distribution, randomize the order of x and 2x, then look at the average of

Re: [R] Large Data Set Help

2008-08-25 Thread Charles C. Berry
On Mon, 25 Aug 2008, Roland Rau wrote: Hi, Jason Thibodeau wrote: I am attempting to perform some simple data manipulation on a large data set. I have a snippet of the whole data set, and my small snippet is 2GB in CSV. Is there a way I can read my csv, select a few columns, and write it

[R] Maintaining repeated ID numbers when transposing with reshape

2008-08-25 Thread jcarmichael
I have a dataset in "long" format that looks something like this: ID TESTRESULT 1 A 17 1 A 12 1 B 15 1 C 12 2 B 8 2 B 9 Now what I would like to do is transpose it like so: IDTEST ATEST B

Re: [R] How to run a model 1000 times, while saving coefficients each time?

2008-08-25 Thread Derrick Lee
Hey Mark, I'm not sure if anyone gave this answer, but I have a similar setup in one of my codes, to get the coefficients and r^2 value, you can use the commands: model1$coefficients (or any part of the term since R can recognize the first couple of letters) summary(model1)$r.squared as fo

Re: [R] Two envelopes problem

2008-08-25 Thread Mario
No, no, no. I have solved the Monty Hall problem and the Girl's problem and this is quite different. Imagine this, I get the envelope and I open it and it has £A (A=10 or any other amount it doesn't matter), a third friend gets the other envelope, he opens it, it has £B, now £B could be either

Re: [R] How to run a model 1000 times, while saving coefficients each time?

2008-08-25 Thread Greg Snow
?replicate -- 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 Mark Na > Sent: Monday, August 25, 2008 2:45 PM > To: [EMAIL PROTECTED] >

Re: [R] Large Data Set Help

2008-08-25 Thread Roland Rau
Hi, Jason Thibodeau wrote: I am attempting to perform some simple data manipulation on a large data set. I have a snippet of the whole data set, and my small snippet is 2GB in CSV. Is there a way I can read my csv, select a few columns, and write it to an output file in real time? This is what

[R] How to run a model 1000 times, while saving coefficients each time?

2008-08-25 Thread Mark Na
Hello, We have written a program (below) to model the effect of a covariate on observed values of a response variable (using only 80% of the rows in our dataframe) and then use that model to calculate predicted values for the remaining 20% of the rows. Then, we compare the observed vs. predic

Re: [R] Displaying Equations in Documentation

2008-08-25 Thread Rolf Turner
On 26/08/2008, at 4:50 AM, Jarrett Byrnes wrote: I'm currently working on writing up some documentation for some of my code, but am having the darndest time coding in equations. For example, the equation in the following: \details{ Calculated the R Squared for observed endogenous variab

Re: [R] Two envelopes problem

2008-08-25 Thread Greg Snow
You are simulating the answer to a different question. Once you know that one envelope contains 10, then you know conditional on that information that either x=10 and the other envelope holds 20, or 2*x=10 and the other envelope holds 5. With no additional information and assuming random choic

Re: [R] Jpg files in R

2008-08-25 Thread Henrique Dallazuanna
Right Barry, I forget. Thanks On Mon, Aug 25, 2008 at 4:51 PM, Barry Rowlingson <[EMAIL PROTECTED]> wrote: > 2008/8/25 Henrique Dallazuanna <[EMAIL PROTECTED]>: >> Is there the rimage package: >> >> >> if(!require(rimage))install.packages("rimage") >> x <- read.jpeg(system.file("data", "cat.jpg",

Re: [R] Large Data Set Help

2008-08-25 Thread jim holtman
Establish a "connection" with the file you want to read, read in 1,000 rows (or whatever you want). If you are using read.csv and there is a header, you might want to skip it initially since there will be no header when you read the next 1000 rows. Also put 'as.is=TRUE" so that character fields a

Re: [R] Two envelopes problem

2008-08-25 Thread markleeds
i haven't looked at your code and I'll try when I have time but, as you stated, that's an EXTREMELY famous problem that has tried to be posed in a bayesian way and all sorts of other things have been done to try solve it. Note that if you change the utility function so that its log(X) rather t

Re: [R] Jpg files in R

2008-08-25 Thread Barry Rowlingson
2008/8/25 Henrique Dallazuanna <[EMAIL PROTECTED]>: > Is there the rimage package: > > > if(!require(rimage))install.packages("rimage") > x <- read.jpeg(system.file("data", "cat.jpg", package="rimage")) Nice, but if the require() fails and the package installs via install.packages, you still have

Re: [R] small spline regression example

2008-08-25 Thread Greg Snow
Are you looking for sample datasets? Or something more? Sample datasets that work include: ?ethanol The relationship between E (x-variable) and NOx (y-variable) is very nonlinear, and a polynomial does not fit as well as a spline. ?mtcars Predict mpg (gas mileage) using weight, hp, or displacem

[R] Two envelopes problem

2008-08-25 Thread Mario
A friend of mine came to me with the two envelopes problem, I hadn't heard of this problem before and it goes like this: someone puts an amount `x' in an envelope and an amount `2x' in another. You choose one envelope randomly, you open it, and there are inside, say £10. Now, should you keep th

[R] Large Data Set Help

2008-08-25 Thread Jason Thibodeau
I am attempting to perform some simple data manipulation on a large data set. I have a snippet of the whole data set, and my small snippet is 2GB in CSV. Is there a way I can read my csv, select a few columns, and write it to an output file in real time? This is what I do right now to a small test

Re: [R] R for Windows GUI closes when I try to read.spss

2008-08-25 Thread Peter Dalgaard
Roderick Harrison wrote: ** High Priority ** Well to you, it is... In general people on this list are happy to help, but you need to supply them with something to go on, and there is just nothing here. At the very least, we'd need version numbers and preferably an example of a file that c

Re: [R] Jpg files in R

2008-08-25 Thread Henrique Dallazuanna
Is there the rimage package: if(!require(rimage))install.packages("rimage") x <- read.jpeg(system.file("data", "cat.jpg", package="rimage")) dim(x)[1:2] 2008/8/25 Leandro Marino <[EMAIL PROTECTED]>: > > > > If I have an file like an JPG, gif, png or other, exist any kind of function > in the R

Re: [R] Problems starting Rcmdr

2008-08-25 Thread stephen sefick
Rcmdr will not work without X11 started. If X11 does not start then, depending on the OS version, you may need to download to latest version from... I don't remember, but if you search the R-SIG-MAC help list you can find the website- I had this same problem and it was fixed with the help of the w

Re: [R] psychometric functions

2008-08-25 Thread Victor Hernando Cervantes Botero
Hi, 2008/8/21 Mario Maiworm <[EMAIL PROTECTED]> > Hi, > I want to fit some psychophysical data with cumulative gaussians. There is > quite a convenient toolbox for matlab called 'psignifit' (formerly known as > 'psychofit'). It allows the lower bound of the sigmoid to vary slightly > from > zero,

[R] Jpg files in R

2008-08-25 Thread Leandro Marino
If I have an file like an JPG, gif, png or other, exist any kind of function in the R to see de dimension in pixels of this image? Thanks Atenciosamente, Leandro Lins Marino Centro de Avaliacao Fundacao CESGRANRIO Rua Santa Alexandrina, 1011 - 2o andar Rio de Janeiro, RJ - CEP: 20261-903 * (

Re: [R] ggplot scale_size - is there any way to specify breaks?

2008-08-25 Thread hadley wickham
> Is there any way to specify a range to scale_size()? There is an option > called "breaks" in scale_size_identity() that does what I want. Is there > something similar for scale_size()? Not in the released version, but there is in the development version - all scales now take a limits argument wh

Re: [R] How to do a meta-analysis plot

2008-08-25 Thread Gabor Grothendieck
See ?metaplot On Mon, Aug 25, 2008 at 2:44 PM, Jorge Ivan Velez <[EMAIL PROTECTED]> wrote: > Dear R-list, > > I'd like to do a meta-analysis plot similar to > > install.packages('rmeta') > require(rmeta) > data(catheter) > a <- meta.MH(n.trt, n.ctrl, col.trt, col.ctrl, data=catheter, >

[R] Problems starting Rcmdr

2008-08-25 Thread Davia Cox Downey
I understand that Rcmdr needs the tcltk package in order to run. However, when I attempt to using the library (Rcmdr) command, I get the message below. I have attempted to start X in R as well as using starting it from the Utilities folder on my Mac to no avail. I can't figure out if there

[R] How to do a meta-analysis plot

2008-08-25 Thread Jorge Ivan Velez
Dear R-list, I'd like to do a meta-analysis plot similar to install.packages('rmeta') require(rmeta) data(catheter) a <- meta.MH(n.trt, n.ctrl, col.trt, col.ctrl, data=catheter, names=Name, subset=c(13,6,5,3,7,12,4,11,1,8,10,2)) summary(a) plot(a) (see attached file) by using my ow

Re: [R] lmer4 and variable selection

2008-08-25 Thread Prof Brian Ripley
On Mon, 25 Aug 2008, jebyrnes wrote: Have you thought about using AIC weights? As long as you are not considering models where you drop your random effects, calculating AIC values (or AICc values) and doing multimodel inference is one way to approach your problem. If you are fitting models wi

Re: [R] ggplot boxplot - how to order categories

2008-08-25 Thread Raj Minhas
Hadley, Many thanks - I have just started using ggplot and it is an amazing package. -Raj. -- View this message in context: http://www.nabble.com/ggplot-boxplot---how-to-order-categories-tp19147920p19148953.html Sent from the R help mailing list archive at Nabble.com. ___

Re: [R] Unicode notation \x000

2008-08-25 Thread Prof Brian Ripley
On Mon, 25 Aug 2008, Christoph Heibl wrote: Dear list, I am trying to replace Unicode notation of German and Spanish special characters (as read in by read.csv from excel spreadsheets) by character strings that can be interpreted by LaTeX. Why? LaTeX can read UTF-8 if you tell it to. E.g

[R] ggplot scale_size - is there any way to specify breaks?

2008-08-25 Thread Raj Minhas
Hi, I am plotting scores for students in a school using a command of the form qplot(x=Subject, y=Student, data=dataset, geom="point", size=Score) It lists the Subject factors on the x-axis and the Student factors on the y-axis - dots proportional to the Score are plotted at the resultant grid.

Re: [R] ggplot boxplot - how to order categories

2008-08-25 Thread hadley wickham
Hi Raj, It's the same as the other plotting systems in R: you need to change the order of the underlying factor levels. e.g.: levels(diamonds$color) <- c("J", "D", "E", "I", "H", "F", "G") If you're reordering then according to the value of another variable, also see ?reorder Hadley On Mon, A

[R] ggplot boxplot - how to order categories

2008-08-25 Thread Raj Minhas
I am interested in creating a boxplot using ggplot or qplot where I can specify the order of the categories being plotted on the x-axis. For example, the following command plots the categories (diamond color) in alphabetic order (D, E, ..., J): qplot(color, price/carat, data=diamonds, geom="boxpl

[R] selection bias adjustment via propensity score

2008-08-25 Thread Bunny, lautloscrew.com
Hi all, i am wondering if there´s any other method to adjust for selection related bias of estimates except propensity scoring and heckit / mills ratio approach? i also read documentation of Match and twang package so far, so i don´t speak of any ATE / ATT related methods, respectively an

Re: [R] Sending "..." to a C external

2008-08-25 Thread John Tillinghast
On Sat, Aug 23, 2008 at 11:46 AM, Douglas Bates <[EMAIL PROTECTED]> wrote: I don't think it is necessary to go through the agonies of dealing with the argument list in a .External call., which is what I assume you are doing. (You haven't given us very much information on how you are trying to pass

Re: [R] XP/Vista/Office 2007/IE Compatibility question

2008-08-25 Thread Richardson, Patrick
http://cran.r-project.org/bin/windows/base/rw-FAQ.html (for the first two questions anyway) _ Patrick Richardson Biostatistician - Program of Translational Medicine Van Andel Research Institute - Webb Lab 333 Bostwick Avenue NE Grand Rapids, MI 49503

[R] R for Windows GUI closes when I try to read.spss

2008-08-25 Thread Roderick Harrison
** High Priority ** I have been trying to read an SPSS file into R using read.spss ("C:/Documents and Settings/Roderick Harrison/My Documents/RWORK/ihisdat.sav", use.value.labels = TRUE, to.data.frame = FALSE, max.value.labels = 500, trim.factor.names = FALSE, trim_values = TRUE, reencode = NA,

[R] XP/Vista/Office 2007/IE Compatibility question

2008-08-25 Thread ifafjc
Good morning. My client currently has Windows 2000 and Office 2000. They are planning to upgrade to Windows XP/Vista/Office 2007. Some computers have R installed. I don't have a version number. I'm working off of a spreadsheet. Please respond to the following questions at your earliest conve

[R] Output to Latex using Memisc almost works

2008-08-25 Thread Eelke
Hello, I'm using memisc to output regression results to tables and latex. My problem is that the output that Latex needs must be in between $ $ so that it is read as formula but memisc does not output the result between $ $. For example, latex needs: $0.05^{***}$ and memisc outputs 0.05^{***} in

[R] Unicode notation \x000

2008-08-25 Thread Christoph Heibl
Dear list, I am trying to replace Unicode notation of German and Spanish special characters (as read in by read.csv from excel spreadsheets) by character strings that can be interpreted by LaTeX. E.g.: uni2latex <- function(x){ x <- gsub("&", "et", x, fixed = TRUE)

[R] small spline regression example

2008-08-25 Thread Erin Hodgess
Dear R People: Could someone recommend a small example for spline regression, please? I would like to show this to my students, step by step. Thanks in advance, Erin -- Erin Hodgess Associate Professor Department of Computer and Mathematical Sciences University of Houston - Downtown mailto: [

Re: [R] lmer4 and variable selection

2008-08-25 Thread Bert Gunter
You **really** should work with a local statistician. Remote statistical advice (this is not really about R) from even well-meaning helpers unfamiliar with your work is really very risky. For example, I would suggest making all sorts of plots (statistical summaries alone are wholly inadequate and

Re: [R] R-ish challenge for dependent ranking

2008-08-25 Thread ivo welch
thank you everybody, again. regards, /iaw __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, repr

[R] Model Comparison in Canonical Correlation Analysis

2008-08-25 Thread Christian Geng
Dear R-users, I have the following question: I am currently performing Canonical Correlation analysis in two data sets (of the same size: identical cases and identical variables. The data in the second data set are actually a transformed version of the data in the first data set.) Now I want to

[R] Displaying Equations in Documentation

2008-08-25 Thread Jarrett Byrnes
I'm currently working on writing up some documentation for some of my code, but am having the darndest time coding in equations. For example, the equation in the following: \details{ Calculated the R Squared for observed endogenous variables in a structural equation model, as well as sever

Re: [R] Using interactive plots to get information about data points

2008-08-25 Thread jcarmichael
Thank you for the GGobi reference, it is a very handy tool! My main goal, however, is to be able to identify univariate outliers (with boxplots for example), and I'm having a hard time getting the rggobi package to do that. Michael Bibo-2 wrote: > > > ?identify with labels argument. > > Anot

Re: [R] lmer4 and variable selection

2008-08-25 Thread jebyrnes
Have you thought about using AIC weights? As long as you are not considering models where you drop your random effects, calculating AIC values (or AICc values) and doing multimodel inference is one way to approach your problem. If you are fitting models with and without random effects, it gets t

Re: [R] Survey Design / Rake questions

2008-08-25 Thread Farley, Robert
Still no joy. :-( I see a number of things that bother me. 1) str(ByEBNum$StnTraveld) says "int [1:12] 1 2 3 4 5 6 7 8 9 10 ..." Even though "StnTraveld <- c(as.factor(1:12))" 2) ByEBOn$StnName[1:5] seems to imply I have extra spaces in the data. Where would they have come from?

Re: [R] R-ish challenge for dependent ranking

2008-08-25 Thread jim holtman
If you want to put it back in the original data frame: > ds= data.frame( xn=rnorm(32), yn=rnorm(32), zn=rnorm(32) ) > ds$drank1group= as.integer((rank( ds$xn )-1)/4) # ok, the first set > ds$drank2group <- ave(ds$yn, ds$drank1group, FUN=rank) > ds xn yn zn drank1grou

Re: [R] contour plots

2008-08-25 Thread Don MacQueen
I think maybe you have to show your data a little better, and exactly how you are using contour. The posting guidelines request a small reproducible example; without that good help is difficult. In the meantime, here is an example that works. x <- 1:4 y <- 1:58 z <- outer(x,y) * r

Re: [R] Deleting NA in list()

2008-08-25 Thread jim holtman
That would work too. Probably had the unlist in there from when I was using 'lapply' at the time. 2. You can not be sure that it is a one element vector. Also it was unclear what should happen if only 'some' of the values of the vector were NA. If it was guarenteed that an element of the list w

[R] lmer4 and variable selection

2008-08-25 Thread Andreas Nord
Dear list, I am currently working with a rather large data set on body temperature regulation in wintering birds. My original model contains quite a few dependent variables, but I do not (of course) wish to keep them all in my final model. I've fitted the following model to the data: > temp.lme

Re: [R] R-ish challenge for dependent ranking

2008-08-25 Thread baptiste auguie
Hi I think you want something like, with(ds, tapply(yn, drank1group, rank) ) also, the reshape package should do this sort of thing neatly. Hope this helps, baptiste On 25 Aug 2008, at 16:10, ivo welch wrote: Dear R wizards: First, thanks for the notes on SQL. These pointers will make

Re: [R] simple generation of artificial data with defined features

2008-08-25 Thread Greg Snow
> -Original Message- > From: drflxms [mailto:[EMAIL PROTECTED] > Sent: Saturday, August 23, 2008 6:47 AM > To: Greg Snow > Cc: r-help@r-project.org > Subject: Re: Re: [R] simple generation of artificial data > with defined features > > Hello Mr. Greg Snow! > > Thank you very much for your p

[R] R-ish challenge for dependent ranking

2008-08-25 Thread ivo welch
Dear R wizards: First, thanks for the notes on SQL. These pointers will make it a lot easier to deal with large data sets. Sorry to have a second short query the same day. I have been staring at this for a while, but I cannot figure out how to do a dependent ranking the R-sh way. ds= data.fra

Re: [R] SQL Primer for R

2008-08-25 Thread Ajay ohri
Not really, if you want R to be as mainstream as other stats packages that can read more than a few gigabytes on the PC. R's relative inefficiency in reading large datasets (due to the RAm loading thing) ,forces people to opt for lesser softwares which are way too expensive for annual license fees

Re: [R] aov, lme, multcomp

2008-08-25 Thread Mark Difford
Hi Richard, >> The tests give different Fs and ps. I know this comes up every once in a >> while on R-help so I did my homework. I see from these two threads: This is not so, or it is not necessarily so. The error structure of your two models is quite different, and this is (one reason) why the

Re: [R] SQL Primer for R

2008-08-25 Thread Thomas Lumley
On Mon, 25 Aug 2008, ivo welch wrote: Dear R wizards: I decided to take the advice in the R data import/export manual and want to learn how to work with SQL for large data sets. I am trying SQLite with the DBI and RSQLite database interfaces. Speed is nice. Alas, I am struggling to find a tut

[R] contour plots

2008-08-25 Thread Sybille Wendel
Hello, I want to make a contour plot. I have a matrix (nrow=4,ncol=58) . and two lists, one with 4 values (the depths) and one with 58 values (time in days)( Depth (should be later on the y-axis),and Time(should be later on the x-axis)) In the matrix there is the temperature f

Re: [R] Deleting NA in list()

2008-08-25 Thread Kenn Konstabel
Umm ... On Mon, Aug 25, 2008 at 2:56 PM, jim holtman <[EMAIL PROTECTED]> wrote: > The only problem with this solution is what happens if the element has > more than one NA: > > [...] > In that case, 'b' does not have the right answer. That was the reason > for using 'all' to check for the condi

[R] aov, lme, multcomp

2008-08-25 Thread Richard D. Morey
I am doing an analysis and would like to use lme() and the multcomp package to do multiple comparisons. My design is a within subjects design with three crossed fixed factors (every participant sees every combination of three fixed factors A,B,C). Of course, I can use aov() to analyze this with

Re: [R] SQL Primer for R

2008-08-25 Thread Gabor Grothendieck
This would be a function of the database software more than R. For sqlite a few dozen gigabytes should be ok. Other databases can handle even larger requirements. On Mon, Aug 25, 2008 at 9:17 AM, Ajay ohri <[EMAIL PROTECTED]> wrote: > R 's ability to work with large data sets is limited on PC. I

Re: [R] SQL Primer for R

2008-08-25 Thread Gabor Grothendieck
The sqldf package's home page http://sqldf.googlecode.com has quite a few examples as well as links to resources. Also see the examples in ?sqldf On Mon, Aug 25, 2008 at 9:12 AM, ivo welch <[EMAIL PROTECTED]> wrote: > Dear R wizards: > > I decided to take the advice in the R data import/export

Re: [R] SQL Primer for R

2008-08-25 Thread Ajay ohri
R 's ability to work with large data sets is limited on PC. I am trying it on cloud to overcome this but need help from other programmers. Also tutorials would help to newbies regards, Ajay On Mon, Aug 25, 2008 at 6:42 PM, ivo welch <[EMAIL PROTECTED]> wrote: > Dear R wizards: > > I decided to

[R] SQL Primer for R

2008-08-25 Thread ivo welch
Dear R wizards: I decided to take the advice in the R data import/export manual and want to learn how to work with SQL for large data sets. I am trying SQLite with the DBI and RSQLite database interfaces. Speed is nice. Alas, I am struggling to find a tutorial that is geared for the kind of stan

Re: [R] GAM-binomial logit link

2008-08-25 Thread Monica Pisica
Hi Marina, Unfortunately i don't know the answer. I still think the best is to contact the author of the package. He might be still in his holiday since in UK school starts sometimes in September, but certainly he is the best to answer your question. I think it will help if you send him also

Re: [R] Fitting a Pareto [was (no subject)]

2008-08-25 Thread Prof Brian Ripley
On Mon, 25 Aug 2008, tayyaba rafiq wrote: I am very new user of R project. Sir I am a research scholar. I am doing Even the newest of users are expected to read and follow the posting guide (proper subject, no HTML mail). work on fitting distributions. Actually sir I want to know that what

Re: [R] Newbie programming help

2008-08-25 Thread ONKELINX, Thierry
Dear Steven, Take a look at the lmList function in the nlme package. It does what you want to do. HTH, Thierry ir. Thierry Onkelinx Instituut voor natuur- en bosonderzoek / Research Institute for Nature and Forest C

Re: [R] [BioC] similarity between two gene lists with varied length

2008-08-25 Thread Deanne Taylor
The made4 package in bioconductor can report gene list similarities. --- Deanne Taylor PhD Executive Director, Bioinformatics Core Department of Biostatistics Harvard School of Public Health 655 Huntington Avenue Boston, MA 02115 [EMAIL PROTECTED] >>> "Weiwei Shi" <[EMAIL PROTECTED]> 08/2

Re: [R] Deleting NA in list()

2008-08-25 Thread jim holtman
The only problem with this solution is what happens if the element has more than one NA: > lt <- list(a = 1:3, b = NA, c = letters[1:3], d = NA) > is.na(lt) a b c d FALSE TRUE FALSE TRUE > lt <- list(a = 1:3, b = c(NA,NA,NA), c = letters[1:3], d = NA) > is.na(lt) a b

[R] Odp: Using sample() with a data frame ?

2008-08-25 Thread Petr PIKAL
Hi you are not overly specific about what you really want but maybe daf1[sample(1:83805, 1), ] This selects randomly 1 rows from daf1 Is this what you want? Regards Petr [EMAIL PROTECTED] napsal dne 25.08.2008 13:31:15: > > I have a data frame (daf1), that holds +8 records, and

[R] (no subject)

2008-08-25 Thread tayyaba rafiq
I am very new user of R project. Sir I am a research scholar. I am doing work on fitting distributions. Actually sir I want to know that what package is use to find parameters of pareto distribution by maximum likelihood method. and i want to find these parameters from my calculated data. Sir I

  1   2   >