[R] Error of Stepwise Regression with number of rows in use has changed: remove missing values?

2010-02-16 Thread Kum-Hoe Hwang
Howdy, R Grues I have enjoyed R, but I cannot solve one problem easily. Please help my problem. When I tried the R script, I got the following Error. This error results from input data file exported through a Excel spreadsheet software. Error in step(lm(pop.rate ~ as.numeric(year) +

[R] Reshaping grouped data

2010-02-16 Thread Myrland Øystein
Dear R-help list, I have grouped data, looking like this: cases - c(23,12,56,81) total - c(123,234,248,390) x1 - c(0,0,1,1) x2 - c(0,1,0,1) Data - as.data.frame(cbind(cases,total,x1,x2)) Data I would like to run a logistic regression with group weights on these, where cases and

Re: [R] error message when downloading packages using the OS X shell

2010-02-16 Thread Jessica Joganic
I apologize for not including my entire script. What I typed into the shell was: *download.packages(ape)* to which R responded with a Tcl/Tk interface allowing me to set my CRAN. After I did so it proceeded to spit out the following error: *Loading Tcl/Tk interface ... done* Error in

Re: [R] Reshaping grouped data

2010-02-16 Thread Dimitris Rizopoulos
one approach is: Data.long - with(Data, data.frame( w = c(rbind(total - cases, cases)), y = rep(0:1, nrow(Data)), x1 = rep(x1, each = 2), x2 = rep(x2, each = 2) )) I hope it helps. Best, Dimitris Myrland Øystein wrote: Dear R-help list, I have grouped data, looking

Re: [R] argh .. if/else .. why?

2010-02-16 Thread Peter Dalgaard
Gabor Grothendieck wrote: On Mon, Feb 15, 2010 at 11:24 AM, David Winsemius dwinsem...@comcast.net wrote: On Feb 15, 2010, at 11:01 AM, hadley wickham wrote: I, personally, utilize the ifelse(test,statement,statement) function when possible over the methodology outlined. if + else and

[R] How can I associate a list of defined names with the dataframes to be downloaded

2010-02-16 Thread Alex Levitchi
Hello I am very thankful for the reply from Jim Holtman and David Winsemius, especially for the understandable explanations. it really works. Now I get another problem I cannot figure out. That is the situation: I work in biology. I need to download several files according to an experiment,

Re: [R] HELP on Non-Linera Mixed-Effect model

2010-02-16 Thread Walmes Zeviani
I never had seen spline() inside some nls()/nlme() function. Are you sure that this fit is possible? Splines makes a lot or successive local polynomial fits, so they need a lot of parameters. I don't think that is possible a good spline fit with only four parameters. In this case you could use

[R] lmer - error asMethod(object) : matrix is not symmetric

2010-02-16 Thread Luisa Carvalheiro
Dear R users, I am having problems using package lme4. I am trying to analyse the effect of a continuous variable (Dist_NV) on a count data response variable (SR_SUN) using Poisson error distribution. However, when I run the model: summary(lmer((SR_SUN)~Dist_NV + (1|factor(Farm_code)) ,

[R] nls.lm AIC

2010-02-16 Thread Baudron, Alan Ronan
Hi there, I'm a PhD student investigating growth patterns in fish. I've been using the minpack.lm package to fit extended von Bertalanffy growth models that include explanatory covariates (temperature and density). I found the nls.lm comand a powerful tool to fit models with a lot of

Re: [R] Error of Stepwise Regression with number of rows in use has changed: remove missing values?

2010-02-16 Thread Mohamed Lajnef
Hi Kum, If you look at the code step function ( by typing step in the R console), the condition (if (length(fit$residuals) != n) ) is not fulfilled, this explains the error! i hope this can help Regards M Kum-Hoe Hwang a écrit : Howdy, R Grues I have enjoyed R, but I cannot solve one

[R] penalized package for ridge regression

2010-02-16 Thread linda garcia
Dear all, I am using penalized package for Ridge regression. I do not know how can I get regression coefficients using that package . Please help me. Thanks -- Linda Garcia [[alternative HTML version deleted]] __

Re: [R] How can I associate a list of defined names with the dataframes to be downloaded

2010-02-16 Thread Paul Hiemstra
Alex Levitchi wrote: Hello I am very thankful for the reply from Jim Holtman and David Winsemius, especially for the understandable explanations. it really works. Now I get another problem I cannot figure out. That is the situation: I work in biology. I need to download several files

Re: [R] Error of Stepwise Regression with number of rows in use has changed: remove missing values?

2010-02-16 Thread Peter Ehlers
On 2010-02-16 1:24, Kum-Hoe Hwang wrote: Howdy, R Grues I have enjoyed R, but I cannot solve one problem easily. Please help my problem. When I tried the R script, I got the following Error. This error results from input data file exported through a Excel spreadsheet software. Error in

Re: [R] HELP on Non-Linera Mixed-Effect model

2010-02-16 Thread Dieter Menne
vaibhav dua wrote: Hi, I'm trying to fit nonlinear mixed effects model using nlme function but getting an error message. Here is what I have: fitted_model = nlme(scores~spline(b1,b2,b3,kt,time), fixed = list(b1~1, b2~1, b3~1, kt~1), random = b1+b2+b3~1,

Re: [R] density estimates for fixed points

2010-02-16 Thread geir
Trafim Vanishek posted a similar problem: Joint density approximation? (without any solution for kde2d). Here is an example to illustrate my problem. Originally data is for example: a=runif(10) (yes, the number of data should be larger) b=runif(10) c=kde2d(a,b,n=10,lims=c(0,1,0,1)) attach(c)

[R] RODBC - Any faster driver?

2010-02-16 Thread Yoni Schamroth
Hi, We are currently using the odbcConnect and odbcDriverConnect functions of RODBC package to connect to a DB built on SQL Server 2005. Are there any other packages / drivers/ methodology that may provide a faster connection? Any help or advice would be appreciated. Thanks

[R] lint for R? and debugging

2010-02-16 Thread Esmail
Good morning .. sorry if this is a basic question, but is there a lint-like utility for R to check for suspicious language constructs? And along the same lines, any type of interactive debugging utility for R? My main use of R is under Linux (though I run code sometimes under Window XP). R

[R] lmer - error asMethod(object) : matrix is not symmetric

2010-02-16 Thread Luisa Carvalheiro
Dear R-help, I am having problems using package lme4. I am trying to analyse the effect of a continuous variable (Dist_NV) on a count data response variable (SR_SUN) using Poisson error distribution. However, when I run the model: summary(lmer((SR_SUN)~Dist_NV + (1|factor(Farm_code)) ,

[R] converting character vector hh:mm to chron or strptime 24 clock time vectors

2010-02-16 Thread Alex Anderson
Hi All, I am attempting to work with some data from loggers. I have read in a .csv exported from MS Access that already has my dates and times (in 24 clock format), (with StringsAsFactors=FALSE). head(tdata) LogData date time 177.16 2008/04/24 02:00 2

[R] for loop Vs apply function Vs foreach (REvolution enhancement)

2010-02-16 Thread julien cuisinier
Dear all, I know this topic has already been covered in other posts (at least the for loop Vs apply family of function), but I am looking for fresh / up-to-date opinion and feedback on those 3 methods to run unavoidable loops in R. I realise that it may be too general question for many, so

Re: [R] PLEASE HELP!!! Total and heading of portfoilo table

2010-02-16 Thread Sarah Sanchez
Dear Madam / R helpers,   Unfortunately the solution you have suggested is not working in the sense that the quantities are not multplying the rows but its multiplying columnwise and hence I am getting all wrong results.   I am again submitting my problem. Please guide me.   I have two input

Re: [R] converting character vector hh:mm to chron or strptime 24 clock time vectors

2010-02-16 Thread stephen sefick
library(chron) #untested as.chron(paste(tdata[,date], tdata[,time]), %Y/%m/%d %H:%M) On Tue, Feb 16, 2010 at 4:47 AM, Alex Anderson complicad...@yahoo.com.au wrote: Hi All, I am attempting to work with some data from loggers. I have read in a .csv exported from MS Access that already has my

Re: [R] RODBC - Any faster driver?

2010-02-16 Thread Dieter Menne
Yoni Schamroth-3 wrote: We are currently using the odbcConnect and odbcDriverConnect functions of RODBC package to connect to a DB built on SQL Server 2005. Are there any other packages / drivers/ methodology that may provide a faster connection? Dates back to 1997: for SQL Server

Re: [R] density estimates for fixed points

2010-02-16 Thread Karl Ove Hufthammer
On Tue, 16 Feb 2010 03:36:17 -0800 (PST) geir gei...@hotmail.com wrote: I want the density estimates for the points in a k x 2 matrix like for example A=[(0,7,0.3),(0.1,0.2),...,(0.5,0.9)]^T which is not equally spaced, (and i do not need the density of

Re: [R] lint for R? and debugging

2010-02-16 Thread Karl Ove Hufthammer
On Tue, 16 Feb 2010 08:00:09 -0500 Esmail esmail...@gmail.com wrote: And along the same lines, any type of interactive debugging utility for R? See this article in R News: 'Debugging Without (Too Many) Tears' http://cran.r-project.org/doc/Rnews/Rnews_2003-3.pdf#page=29 -- Karl Ove Hufthammer

Re: [R] PLEASE HELP!!! Total and heading of portfoilo table

2010-02-16 Thread Benilton Carvalho
say you read the quantity.csv file into a variable called 'quantity'... similarly, 'equity_price.csv' to equity. sweep(equity, 2, quantity, *) b On Tue, Feb 16, 2010 at 11:20 AM, Sarah Sanchez sarah_sanche...@yahoo.com wrote: Dear Madam / R helpers, Unfortunately the solution you have

Re: [R] Estimated Standard Error for Theta in zeroinfl()

2010-02-16 Thread Lam, Tzeng Yih
Dear Dr. Turner, Thank you very much for taking the time to answer my request. The suggestion that you have provided did ring a bell for me. So, I went digging a bit and found the following article that I have read a while ago: Baskerville, G.L. 1972. Use of logarithmic regression in the

[R] ellipsis-related error: used in an incorrect context, no ... to look in

2010-02-16 Thread lith
Hi, I have the following code snippet: require(lattice) f.barchart - function(...) { barchart(..., panel = function(x, y, ...) { panel.barchart(x, y, ...) } ) } x - data.frame(a = c(1,1,2,2), b = c(1,2,3,4), c = c(1,2,2,1))

Re: [R] Estimated Standard Error for Theta in zeroinfl()

2010-02-16 Thread Lam, Tzeng Yih
Dear Dr. Zeileis, Thank you for pointing out on the maximum likelihood estimator property as well as the delta method to obtain the standard error of estimated Theta. I agree with you in that whether getting the standard error of estimated Theta is useful or not. I will think about this

Re: [R] tree-drawing in R ?

2010-02-16 Thread Upton, Stephen C
Also try igraph Stephen C. Upton Research Associate SEED (Simulation Experiments Efficient Designs) Center for Data Farming Naval Postgraduate School From: William Revelle li...@revelle.net Date: Mon, 15 Feb 2010 13:57:19 -0600 To: Oliver Kullmann o.kullm...@swansea.ac.uk,

Re: [R] density estimates for fixed points

2010-02-16 Thread geir
But since you don't, why not calculate the density directly for each point (e.g., in a loop). The formula is simple enough: mean(dnorm(x-gx,sd=h1)*dnorm(y-gy,sd=h2)) yes, this was my initial thought, and it works. (But i was hoping kde2d or some similar function could do it faster). I'l try

[R] Triangular filled contour plot

2010-02-16 Thread kajo
Hi all, I am working on a filled contour plot which shows a triangular matrix data set (as shown below). Is there a possibilty to draw a triangular filled contour in a equilateral triangle (like a ternary plot)? Thanks in advance Johannes http://n4.nabble.com/file/n1557386/Bild3.png -- View

[R] error : unused argument(s) when boxplot

2010-02-16 Thread Pauline Haleux (JIC)
Dear all, I am a total beginner in R, so sorry if this is the wrong place. I am using R 2.10.1 on a Mac (Mac OS 10.6.2). I have this small dataset : growth sugar 75 C 72 C 73 C 61 F 67 F 64 F 62 S 63

[R] False convergence of a glmer model

2010-02-16 Thread Shige Song
Dear All, I am trying to fit a 2-level random intercept logistic regression on a data set of 20,000 cases. The model is specified as the following: __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the

[R] False convergence of a glmer model

2010-02-16 Thread Shige Song
Dear All, I am trying to fit a 2-level random intercept logistic regression on a data set of 20,000 cases. The model is specified as the following: m1 - glmer(inftmort ~ as.factor(cohort) + (1|code), family=binomial, data=d) I got Warning message: In mer_finalize(ans) : false convergence (8)

Re: [R] error : unused argument(s) when boxplot

2010-02-16 Thread Uwe Ligges
On 16.02.2010 15:18, Pauline Haleux (JIC) wrote: Dear all, I am a total beginner in R, so sorry if this is the wrong place. I am using R 2.10.1 on a Mac (Mac OS 10.6.2). I have this small dataset : growth sugar 75 C 72 C 73 C 61 F 67

Re: [R] for loop Vs apply function Vs foreach (REvolution enhancement)

2010-02-16 Thread Liviu Andronic
Hello On 2/16/10, julien cuisinier j_cuisin...@hotmail.com wrote: 1. apply Vs for loop Seems apply is (was?) supposed to be faster than using for loop, some posts mention that it is now more of a cosmetic function (wrapper for for loop) making the code essentially neater. Any

Re: [R] False convergence of a glmer model

2010-02-16 Thread Douglas Bates
On Tue, Feb 16, 2010 at 9:05 AM, Shige Song shiges...@gmail.com wrote: Dear All, I am trying to fit a 2-level random intercept logistic regression on a data set of 20,000 cases.  The model is specified as the following:  m1 - glmer(inftmort ~ as.factor(cohort) + (1|code), family=binomial,

Re: [R] survival - ratio likelihood for ridge coxph()

2010-02-16 Thread Terry Therneau
It seems to me that R returns the unpenalized log-likelihood for the ratio likelihood test when ridge regression Cox proportional model is implemented. Is this as expected? It is easy to verify that this is correct: fit1 - coxph(Surv(time, status) ~ ridge(age) + ph.ecog, lung) fit2 -

Re: [R] svm and RMSE

2010-02-16 Thread Steve Lianoglou
Hi, On Fri, Feb 12, 2010 at 3:00 PM, Amy Hessen amy_4_5...@hotmail.com wrote: Hi, Every time I run a svm regression program, I got different RMSE value. Could you please tell me what the reason for that? Sorry, your question is a bit vague. Can you provide an example/code that shows this

Re: [R] lmer - error asMethod(object) : matrix is not symmetric

2010-02-16 Thread Douglas Bates
This is similar to another question on the list today. On Tue, Feb 16, 2010 at 4:39 AM, Luisa Carvalheiro lgcarvalhe...@gmail.com wrote: Dear R users, I  am having problems using package lme4. I am trying to analyse the effect of a continuous variable (Dist_NV) on a count data response

Re: [R] False convergence of a glmer model

2010-02-16 Thread Shige Song
Hi Doug, Thanks. Next time I will post it to the R-SIG0-mixed-models mailing list, as you suggested. With respect to your question, the answer is no, these parameters do not make sense. Here is the Stata output from exactly the same model: . xi:xtlogit inftmort i.cohort, i(code) i.cohort

Re: [R] Reshaping grouped data

2010-02-16 Thread Peter Dalgaard
Whoops, forgot to cc. the list... -pd Myrland Øystein wrote: Dear R-help list, I have grouped data, looking like this: cases - c(23,12,56,81) total - c(123,234,248,390) x1 - c(0,0,1,1) x2 - c(0,1,0,1) Data - as.data.frame(cbind(cases,total,x1,x2)) Data

Re: [R] Estimated Standard Error for Theta in zeroinfl()

2010-02-16 Thread Achim Zeileis
On Tue, 16 Feb 2010, Lam, Tzeng Yih wrote: Dear Dr. Turner, Thank you very much for taking the time to answer my request. The suggestion that you have provided did ring a bell for me. So, I went digging a bit and found the following article that I have read a while ago: Baskerville, G.L.

Re: [R] Total and heading of portfoilo table

2010-02-16 Thread Petr PIKAL
Hi r-help-boun...@r-project.org napsal dne 16.02.2010 08:05:08: Hi! I am not expert in R, but perhaps you can try the following - X = as.numeric(read.csv('quantity.csv')) Y = read.csv('equity_price.csv') Y = Y[, -1] Z = X*Y port_val = NULL for(i in 1 : nrow(Z)) {

[R] Random Forest

2010-02-16 Thread Dror
Hi, i'm using randomForest package and i have 2 questions: 1. Can i drop one tree from an RF object? 2. i have a 300 trees forest, but when i use the predict function on new data (with predict.all=TRUE) i get only 270 votes. did i do something wrong? Thanks -- View this message in context:

[R] Odp: error : unused argument(s) when boxplot

2010-02-16 Thread Petr PIKAL
Hi r-help-boun...@r-project.org napsal dne 16.02.2010 15:18:21: Dear all, I am a total beginner in R, so sorry if this is the wrong place. I am using R 2.10.1 on a Mac (Mac OS 10.6.2). I have this small dataset : growth sugar 75 C 72 C 73 C 61 F 67 F 64

[R] reading quattro pro spreadsheet .qpw into R

2010-02-16 Thread stephen sefick
I have many quattro pro spreadsheets and no quattro pro. Is there a way to access the data using R, or any other solution that anyone can think of? thanks, -- Stephen Sefick Let's not spend our time and resources thinking about things that are so little or so large that all they really do for

[R] margin text warning message NAs coercion

2010-02-16 Thread e-letter
Readers, I tried to the following commands: plot(y~x,ylab=expression(A[1]~B[2],xlab=expression(C~D)) mtext(expression(A[1]~B[2]),additional text,side=3,line=1) I receive the text that I want, but the command terminal shows the following response: Warning message: NAs introduced by coercion in:

[R] combining dataframes with different row lenght

2010-02-16 Thread Juan Pablo Fededa
Hello list, I want to combine dataframes from tsv files which have different row lenght. I tryed cbind but doesn't work. Is there an easy way to fill with NAs till a common point of rows for all the dataframes and then merge them? Any other idea? Thanks a lot, Juan [[alternative HTML

[R] Does the R statistical language includes modules/packages to carry out nonlinear optimization similar to the SAS NLIN and NLP procedures?

2010-02-16 Thread Powers, Randall - BLS
Hello R folks, I'm hoping the answer to the question in the subject line. I have in the past used SAS PROC NLIN and PROC NLP to carry out nonlinear optimizations. I'm wondering if there is analogous ways for doing this using R. If so, could someone please point me to some literature that would

[R] line options on read.spss

2010-02-16 Thread Never Read
Hi, I am a newbie here. I like the ability to read SPSS file since it comes with other info. My problem with it is that it seems that I have to read the whole file into the memory. For the csv file, I can read part of it and dump them into the database so that even though I don't have a

[R] Build failure on Solaris 10 (SPARC)

2010-02-16 Thread Dr. David Kirkby
I'm trying to build R 2.10.1 on a Sun Blade 1000 running Solaris 10 (03/05 release). I've installed iconv 1.13.1 and used: CPPFLAGS=-I /export/home/drkirkby/sage-4.3.3.alpha0/local/include (which is where iconv is) LDFLAGS= -R/export/home/drkirkby/sage-4.3.3.alpha0/local/lib

Re: [R] for loop Vs apply function Vs foreach (REvolution enhancement)

2010-02-16 Thread Steve Lianoglou
Hi, 2. foreach (REvolution enhancement) seems the rationale of this function is to facilitate the use of multithreading to enhance the for loop speed. Given a moderate time sensitivity (process must run fast but a gain of 10-20% speed seen as probably not justifying the additional learning +

Re: [R] Does the R statistical language includes modules/packages to carry out nonlinear optimization similar to the SAS NLIN and NLP procedures?

2010-02-16 Thread David Winsemius
On Feb 16, 2010, at 11:09 AM, Powers, Randall - BLS wrote: Hello R folks, I'm hoping the answer to the question in the subject line. I have in the past used SAS PROC NLIN and PROC NLP to carry out nonlinear optimizations. I'm wondering if there is analogous ways for doing this using R. If

[R] Reminder: ASA Stat Comp/Graph Chambers Award Competition Deadline 2/22

2010-02-16 Thread Fei Chen
Just a gentle reminder that the deadline for submission to the Chambers Award Competition is fast approaching. All application materials must be received by 5:00pm EST, Monday, February 22, 2010. For submission guidelines, please visit

Re: [R] reading quattro pro spreadsheet .qpw into R

2010-02-16 Thread Barry Rowlingson
On Tue, Feb 16, 2010 at 4:12 PM, stephen sefick ssef...@gmail.com wrote: I have many quattro pro spreadsheets and no quattro pro.  Is there a way to access the data using R, or any other solution that anyone can think of? OpenOffice claims it can read Quattro Pro 6.0 'wb2' files, but maybe

Re: [R] reading quattro pro spreadsheet .qpw into R

2010-02-16 Thread Tom Backer Johnsen
stephen sefick wrote: I have many quattro pro spreadsheets and no quattro pro. Is there a way to access the data using R, or any other solution that anyone can think of? thanks, One possibility is to download the trial version of Corel Office and use that to convert the files to something

Re: [R] Does the R statistical language includes modules/packagesto carry out nonlinear optimization similar to the SAS NLINand NLP procedures?

2010-02-16 Thread Bert Gunter
Randall: Are you familiar with R's Search facilities? If not, don't you think you should be? If so, why don't you try using them BEFORE posting on this list. ?help ?help.search help.search(optimization) ##gives several alternatives Bert Gunter Genentech Nonclinical Biostatistics

Re: [R] multiple-test correlation

2010-02-16 Thread Greg Snow
?p.adjust -- Gregory (Greg) L. Snow Ph.D. Statistical Data Center Intermountain Healthcare greg.s...@imail.org 801.408.8111 -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r- project.org] On Behalf Of Manuel Jesús López Rodríguez Sent: Sunday, February

Re: [R] lmer - error asMethod(object) : matrix is not symmetric

2010-02-16 Thread Luisa Carvalheiro
Dear Douglas, Thank you for your reply. Just some extra info on the dataset: In my case Number of obs is 33, and number of groups of factor(Farm_code) is 12. This is the information on iterations I get: summary(lmer(round(SR_SUN)~Dist_NV + (1|factor(Farm_code)) , family=poisson, verbose =TRUE))

Re: [R] Sampling from Bivariate Uniform Distribution

2010-02-16 Thread Greg Snow
The correlation will not be exactly 0, but will represent a draw from an independent population. There may be something in the copulas package to allow for more independence (but that about exhausts my knowledge of that package). -- Gregory (Greg) L. Snow Ph.D. Statistical Data Center

Re: [R] reading quattro pro spreadsheet .qpw into R

2010-02-16 Thread Marc Schwartz
On Feb 16, 2010, at 10:35 AM, Barry Rowlingson wrote: On Tue, Feb 16, 2010 at 4:12 PM, stephen sefick ssef...@gmail.com wrote: I have many quattro pro spreadsheets and no quattro pro. Is there a way to access the data using R, or any other solution that anyone can think of? OpenOffice

[R] OT: computing percentage changes with negative and zero values?

2010-02-16 Thread Liviu Andronic
Dear all I need to compute percentage changes of my data, but unfortunately they contain both negative and zero values, and I am quite confused on how to proceed. Searching the internet I found that many people ran into similar issues, with no obvious solution available. The last couple of weeks

Re: [R] margin text warning message NAs coercion

2010-02-16 Thread Peter Ehlers
On 2010-02-16 9:21, e-letter wrote: Readers, I tried to the following commands: plot(y~x,ylab=expression(A[1]~B[2],xlab=expression(C~D)) mtext(expression(A[1]~B[2]),additional text,side=3,line=1) Your plot() call is not reproducible. Anyway, try mtext(expression(A[1]~B[2]~~additional

[R] popbio and stochastic lambda calculation

2010-02-16 Thread Shawn Morrison
Hello R users, I am trying to calculate the stochastic lambda for a published matrix population model using the popbio package. Unfortunately, I have been unable to match the published results. Can anyone tell me whether this is due to slightly different methods being used, or have I gone

Re: [R] margin text warning message NAs coercion

2010-02-16 Thread e-letter
On 16/02/2010, Peter Ehlers ehl...@ucalgary.ca wrote: On 2010-02-16 9:21, e-letter wrote: Readers, I tried to the following commands: plot(y~x,ylab=expression(A[1]~B[2],xlab=expression(C~D)) mtext(expression(A[1]~B[2]),additional text,side=3,line=1) Your plot() call is not reproducible.

Re: [R] argh .. if/else .. why?

2010-02-16 Thread William Dunlap
-Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of Peter Dalgaard Sent: Tuesday, February 16, 2010 1:33 AM To: Gabor Grothendieck Cc: r-help@r-project.org Subject: Re: [R] argh .. if/else .. why? Gabor Grothendieck wrote:

Re: [R] margin text warning message NAs coercion

2010-02-16 Thread Peter Ehlers
On 2010-02-16 10:18, e-letter wrote: On 16/02/2010, Peter Ehlersehl...@ucalgary.ca wrote: On 2010-02-16 9:21, e-letter wrote: Readers, I tried to the following commands: plot(y~x,ylab=expression(A[1]~B[2],xlab=expression(C~D)) mtext(expression(A[1]~B[2]),additional text,side=3,line=1)

Re: [R] margin text warning message NAs coercion

2010-02-16 Thread David Winsemius
On Feb 16, 2010, at 12:18 PM, e-letter wrote: On 16/02/2010, Peter Ehlers ehl...@ucalgary.ca wrote: On 2010-02-16 9:21, e-letter wrote: Readers, I tried to the following commands: plot(y~x,ylab=expression(A[1]~B[2],xlab=expression(C~D)) mtext(expression(A[1]~B[2]),additional

[R] RODBC missing values in integer columns

2010-02-16 Thread Rob Forler
Hello, We are having some strange issues with RODBC related to integer columns. Whenever we do a sql query the data in a integer column is 150 actual data points then 150 0's then 150 actual data points then 150 0's. However, our database actually has numbers where the 0's are filled in.

Re: [R] Triangular filled contour plot

2010-02-16 Thread Cleber Borges
hello, maybe this code can be useful for you. cleber --- trimage - function(f){ x = y = seq( 1, 0, l=181 ) t1 = length(x) im = aux = numeric(0) for( i in seq( 1, t1, by = 2 ) ){ #idx = seq( t1**2, i*t1, by = -t1 ) - ((t1 - i):0) idx = seq( i*t1, t1**2, by = t1 )

Re: [R] argh .. if/else .. why?

2010-02-16 Thread David Winsemius
On Feb 16, 2010, at 12:15 PM, William Dunlap wrote: -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of Peter Dalgaard Sent: Tuesday, February 16, 2010 1:33 AM To: Gabor Grothendieck Cc: r-help@r-project.org Subject: Re: [R] argh ..

Re: [R] margin text warning message NAs coercion

2010-02-16 Thread fishman.R
I have a question for you. What's your purpose to put additional text in the margin? In your code, the first expression(A[1]~B[2]) corresponds to text. If you wanna additional text together with expression(A[1]~B[2]), you should use paste. If you can clarify what kind of margin you want, that

Re: [R] combining dataframes with different row lenght

2010-02-16 Thread fishman.R
If you can specify the questions in more details, that would be more helpful. -- View this message in context: http://n4.nabble.com/combining-dataframes-with-different-row-lenght-tp1557569p1557610.html Sent from the R help mailing list archive at Nabble.com.

[R] delete repeated values - not unique...

2010-02-16 Thread jorgusch
Hello, I must be blind not to see it, but I have the following vector: 4 4 5 6 6 4 What I would like to have as a result is: 4 5 6 4 All repeated values are gone. I cannot use unique for this, as the second 4 would disappear. Is there another fast function for this problem? Thanks in

Re: [R] lint for R? and debugging

2010-02-16 Thread Esmail
On 16-Feb-10 09:03, Karl Ove Hufthammer wrote: On Tue, 16 Feb 2010 08:00:09 -0500 Esmailesmail...@gmail.com wrote: And along the same lines, any type of interactive debugging utility for R? See this article in R News: 'Debugging Without (Too Many) Tears'

Re: [R] delete repeated values - not unique...

2010-02-16 Thread Marc Schwartz
On Feb 16, 2010, at 11:01 AM, jorgusch wrote: Hello, I must be blind not to see it, but I have the following vector: 4 4 5 6 6 4 What I would like to have as a result is: 4 5 6 4 All repeated values are gone. I cannot use unique for this, as the second 4 would

Re: [R] delete repeated values - not unique...

2010-02-16 Thread Erik Iverson
Well, can you algorithmically describe what you are trying to do? Your example is not sufficient to determine it. For instance, are you trying to: 1) remove repeated elements of a vector and concatenate the first element at the end? 2) remove repeated elements of a vector and concatenate

Re: [R] delete repeated values - not unique...

2010-02-16 Thread William Dunlap
-Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of jorgusch Sent: Tuesday, February 16, 2010 9:01 AM To: r-help@r-project.org Subject: [R] delete repeated values - not unique... Hello, I must be blind not to see it, but I

Re: [R] delete repeated values - not unique...

2010-02-16 Thread David Winsemius
On Feb 16, 2010, at 12:01 PM, jorgusch wrote: Hello, I must be blind not to see it, but I have the following vector: 4 4 5 6 6 4 What I would like to have as a result is: 4 5 6 4 ?diff vec - c(4,4,5,6,6,4) vec[ c(1, diff(vec)) != 0 ] [1] 4 5 6 4 All repeated values are gone. I

Re: [R] delete repeated values - not unique...

2010-02-16 Thread Erik Iverson
Ah, the request was 'hidden' in the subject of the message, apologies! Erik Iverson wrote: Well, can you algorithmically describe what you are trying to do? Your example is not sufficient to determine it. For instance, are you trying to: 1) remove repeated elements of a vector and

Re: [R] Triangular filled contour plot

2010-02-16 Thread Walmes Zeviani
Johannes, Some months ago it was posted on R-help a list of packages that handle with ternaryplots, altough none of them can handle surfaceplots, just scatterplots, on a triangular area. The packages were plot.acomp in compositions tri in cwhmisc.cwhtool triax in plotrix ternary in StatDA

[R] suppress printing within a function

2010-02-16 Thread Jarrett Byrnes
I'm working with a few functions (e.g. do.base.descriptions in the netstat package) that, in addition to returning an object with variables I want to extract, also print output. There is no way to turn this default printing behavior off in many of the functions. Is there a blanket way to

Re: [R] Random Forest

2010-02-16 Thread Liaw, Andy
From: Dror Hi, i'm using randomForest package and i have 2 questions: 1. Can i drop one tree from an RF object? Yes. 2. i have a 300 trees forest, but when i use the predict function on new data (with predict.all=TRUE) i get only 270 votes. did i do something wrong? Try to follow the

Re: [R] suppress printing within a function

2010-02-16 Thread David Winsemius
On Feb 16, 2010, at 1:31 PM, Jarrett Byrnes wrote: I'm working with a few functions (e.g. do.base.descriptions in the netstat package) that, in addition to returning an object with variables I want to extract, also print output. There is no way to turn this default printing behavior off in

[R] replicating aov results with lmer

2010-02-16 Thread Elizabeth Purdom
I am trying to replicate the results of an aov command with lmer, to understand the syntax, but I can't quite figure it out. I have a dataset from Montgomery p. 520 with a nested and factorial layout. There are 3 fixtures, 2 layouts (the treatments) in a factorial design, but the operators who

Re: [R] RODBC missing values in integer columns

2010-02-16 Thread Rob Forler
some more info t(t(odbcGetInfo(connection))) [,1] DBMS_NameAdaptive Server Anywhere DBMS_Ver 12.70. Driver_ODBC_Ver 03.51 Data_Source_Name dbname Driver_Name Adaptive Server Anywhere Driver_Ver 09.00.0001 ODBC_Ver 03.52. Server_Name

[R] SVM e1071

2010-02-16 Thread Anderson de Rezende Rocha
Dear R-users, Does anyone know how to get margins' information using SVM under package e1071? I have a two class classification problem and I'd like to have, for each input example, the distance of this example to the margin just like it's possible to obtain using C-based SVM-light, for

Re: [R] Double Integral Minimization Problem

2010-02-16 Thread MVika
Hi, I am using v1.0-4 of adapt and v2.10.1 of R. Thank you, M. -- View this message in context: http://n4.nabble.com/Double-Integral-Minimization-Problem-tp1475150p155.html Sent from the R help mailing list archive at Nabble.com. __

[R] Legend Text Font Size

2010-02-16 Thread Rob Helpert
Hi. I have a plot containing a large number of lines. I have placed a legend in the plot, but with so many lines, the legend takes up a lot of space. I have tried to reduce the spacing between the lines using the legend parameter x.intersp=0.7, but this does not compress the legend enough. Is

Re: [R] delete repeated values - not unique...

2010-02-16 Thread Alex Yuan
rle() is cool. - PhD Candidate in Statistics Dept. of Mathematics Statistics University of New Hampshire Durham, NH 03824 USA -- View this message in context: http://n4.nabble.com/delete-repeated-values-not-unique-tp1557625p1557728.html Sent from the R help mailing list archive at

Re: [R] Reading sas7bdat files directly

2010-02-16 Thread Annoyia Mouse
If you don't have SAS and still need to read or write sas7bdat files: there is the World Programming System (WPS) (commercial software). http://www.teamwpc.co.uk/home/ -- View this message in context: http://n4.nabble.com/Reading-sas7bdat-files-directly-tp1469515p1557807.html Sent from the R

Re: [R] lmer - error asMethod(object) : matrix is not symmetric

2010-02-16 Thread Douglas Bates
On Tue, Feb 16, 2010 at 10:54 AM, Luisa Carvalheiro lgcarvalhe...@gmail.com wrote: Dear Douglas, Thank you for your reply. Just some extra info on the dataset: In my case Number of obs is 33, and number of groups of factor(Farm_code) is 12. This is the information on iterations I get:

Re: [R] Legend Text Font Size

2010-02-16 Thread Uwe Ligges
On 16.02.2010 19:59, Rob Helpert wrote: Hi. I have a plot containing a large number of lines. I have placed a legend in the plot, but with so many lines, the legend takes up a lot of space. I have tried to reduce the spacing between the lines using the legend parameter x.intersp=0.7, but

Re: [R] False convergence of a glmer model

2010-02-16 Thread Douglas Bates
On Tue, Feb 16, 2010 at 9:38 AM, Shige Song shiges...@gmail.com wrote: Hi Doug, Thanks. Next time I will post it to the R-SIG0-mixed-models mailing list, as you suggested. I have added R-SIG-mixed-models to the cc: list. I suggest we drop the cc: to R-help after this message. With respect

[R] General JRI questions

2010-02-16 Thread Ralf B
Hi all, I recently started to work with JRI/rJava and have already run R statements from Java. Since I have larger units encapsulated in R scripts, I would like to run those from Java directly. I was not able to answer the following questions and would appreciate your help on this: How do I run

Re: [R] odfTable: table width and alignment

2010-02-16 Thread Aleksey Naumov
Max, Thank you for your help. Please see my responses below. On Tue, Feb 9, 2010 at 8:20 PM, Max Kuhn mxk...@gmail.com wrote: I am trying to figure out how to control table width and alignment on the page for a table generated by odfTable. Based on reading odfWeave documentation

[R] Random center effect

2010-02-16 Thread David Hajage
Hello R users, I'm trying to take into acount the center effect in a clinical study comparing 3 treatments (data from the book Applied Mixed Models in Medicine Statistics by Helen Brown and Robin Prescott): - dbp: diastolic blood pressure at 8 weeks - dbp0: diastolic blood pressure at inclusion -

[R] Math.factor error message

2010-02-16 Thread Hichem Ben Khedhiri
Dear R-helpers, I am using a vrtest on time series data. My commands are as follows; read.table(B.txt,sep=\t,fill=TRUE, na.strings = NA) require(vrtest) rm(list=ls(all=TRUE)) datamat - read.table(B.txt,sep=\t,fill=TRUE, na.strings = NA) column - 1 nob - nrow(datamat) y -

  1   2   >