Re: [R] generate a number using exponential low

2011-12-13 Thread Adel ESSAFI
Deal list I want to generate a random number in an interval using exponential low I know how to make that simply using uniform low x1 - runif(1, 5.0, 7.5) this will generate a number between 5 et 7.5 but with uniform low. Could you help pease.? Regards -- PhD candidate in Computer

Re: [R] multiple comparison of interaction of ANCOVA

2011-12-13 Thread Jinsong Zhao
Thank you very much for the suggestions. On 2011-12-13 3:20, Richard M. Heiberger wrote: ... On Mon, Dec 12, 2011 at 7:00 AM, Jinsong Zhao jsz...@yeah.net mailto:jsz...@yeah.net wrote: Apart from the data set here, is there a way to do multiple comparison on the interaction of one way

Re: [R] sum with dates

2011-12-13 Thread Rolf Turner
On 13/12/11 15:39, Ana wrote: How do I sum 15 years to my dataset? You mean ``How do I ***add*** 15 years '' See the thread starting at http://r.789695.n4.nabble.com/Adding-a-year-to-existing-date-tp4078930p4078930.html cheers, Rolf Turner original dataset

[R] Time series plots- x axis frequency issues

2011-12-13 Thread Syd88
Hi, I am trying to create a TS residual plot for a weekly data set over several years. However, the data set obtains alot of missing data which has been omitted from the analysis. The only issue is when I make the plot for the TS residual graph you have to state the frequency in the coding i.e.

Re: [R] Is there a way to print branch distances for hclust function?

2011-12-13 Thread kbrownk
Never mind on my reply post (hasn't posted yet, but assuming it does). I found a way to use the merge and height values with Excel to subtract out the lower level distance. Thanks for the help! kbrownk On Dec 12, 1:38 am, Peter Langfelder peter.langfel...@gmail.com wrote: On Sun, Dec 11, 2011

Re: [R] Is there a way to print branch distances for hclust function?

2011-12-13 Thread kbrownk
Thanks, I had tried using height but I was using it wrong. If I had the distances alone it would be enough, except that the height returns the distance all the way to 0, rather than to the adjacent merge. So, if an initial merge at height 0 has a distance of 10, and that object then merges again

[R] Re : Polygon

2011-12-13 Thread Komine
HI, Sorry Carl, I received your message in my spam folder. Sarah proposed me a good example of code. Thank you Momadou  De : Carl Witthoft [via R] ml-node+s789695n4188375...@n4.nabble.com Envoyé le : Mardi 13 Décembre 2011 3h34 Objet : Re: Polygon

[R] sort() function for dates

2011-12-13 Thread Ana
Thanks people! another question, is there something similar to sort for dates? sort(x, decreasing = FALSE, ...) On Tue, Dec 13, 2011 at 8:34 AM, Jorge I Velez jorgeivanve...@gmail.com wrote: Hi Ana, Check section 4 of http://www.jstatsoft.org/v40/i03/paper for more alternatives. HTH,

[R] Problem with package compilation

2011-12-13 Thread Ronaldo Reis Júnior
Hi, I have a R package with some functions made all of then only with R code. I use the command R CMD build to build a package that I can install on linux, windows or mac, because all the code is only R code. But I have some problems with R version. For each new R version I need to rebuild

[R] Problem with package compilation

2011-12-13 Thread Ronaldo Reis Júnior
Hi, I have a R package with some functions made all of then only with R code. I use the command R CMD build to build a package that I can install on linux, windows or mac, because all the code is only R code. But I have some problems with R version. For each new R version I need to rebuild

Re: [R] Prediction from censReg?

2011-12-13 Thread Arne Henningsen
Dear Zack On 4 December 2011 03:08, z2.0 zack.abraham...@gmail.com wrote: Wanted to ask if there's an easy way to use 'predict' with objects of class 'censReg', 'maxLik', 'maxim' or 'list'. Have a left-censored dataset, attempting to use a Tobit model and am working with the censReg package.

Re: [R] generate a number using exponential low

2011-12-13 Thread R. Michael Weylandt michael.weyla...@gmail.com
It's not entirely clear to me what you mean by an exponential low but the lmomco package provides r,d,p,q-functions for both the shifted and truncated exponential distributions. Perhaps that's what you're after? If there's another distribution you have in mind, I'd check the CRAN distributions

[R] UseR! 2011 slides and videos - now online

2011-12-13 Thread Tal Galili
Hello dear R community, Recently, the wonderful peoplehttp://www.warwick.ac.uk/statsdept/useR-2011/index.html#Aboutbehind useR!2011 made sure to nudge the speakers to send in their slides from the conference, and updated the conference's website with links to the slides (and

[R] Ox functions in R

2011-12-13 Thread Chuse chuse
Dear all, I have downloaded Ox console and Arfima package and made it run. I would like to be able to call certain Ox functions from package Arfima from R, such as, Arfima::FreeD. Could you, please, give some advice how to do it? Thank you beforehand. Chuse.

[R] How to stop popping up messages when R starts?

2011-12-13 Thread Christofer Bogaso
Dear all, is there any way to stop popping up the start-up messages when I start a new R console window? I want a clean window for my work which obviously can be done by pressing 'cont+l'. However I want R should be able to do it automatically, as soon as it starts. Thanks and regards,

Re: [R] How to stop popping up messages when R starts?

2011-12-13 Thread R. Michael Weylandt michael.weyla...@gmail.com
Use the -q option when calling R. Michael On Dec 13, 2011, at 8:06 AM, Christofer Bogaso bogaso.christo...@gmail.com wrote: Dear all, is there any way to stop popping up the start-up messages when I start a new R console window? I want a clean window for my work which obviously can be done

Re: [R] sort() function for dates

2011-12-13 Thread David Winsemius
On Dec 13, 2011, at 3:43 AM, Ana wrote: Thanks people! another question, is there something similar to sort for dates? sort(x, decreasing = FALSE, ...) So what makes you even suspect that there wasn't a sort method for dates? -- David. On Tue, Dec 13, 2011 at 8:34 AM, Jorge I Velez

Re: [R] How to stop popping up messages when R starts?

2011-12-13 Thread Christofer Bogaso
Thanks Michael for your reply. But how can I do that? Thanks and regards, -Original Message- From: R. Michael Weylandt michael.weyla...@gmail.com [mailto:michael.weyla...@gmail.com] Sent: Tuesday, December 13, 2011 7:02 PM To: Christofer Bogaso Cc: r-help@r-project.org Subject: Re: [R]

Re: [R] Inverse matrix using eigendecomposition

2011-12-13 Thread wwreith
Sorry but I am not a student, at least not since 2007. However I am performing grunt work for a someone with a Ph.D. so it does remind me of the student days. I just have a pay check instead of student loans. -- View this message in context:

Re: [R] axis tick colors: only one value allowed?

2011-12-13 Thread Hans W Borchers
Carl Witthoft carl at witthoft.com writes: Hi, So far as I can tell, the 'col.ticks' parameter for axis() only uses the first value provided. E.g.: plot(0:1,0:1, col.ticks=c('blue','red','green')) #all ticks are blue Just wondering if there's a different option in the basic plot

Re: [R] How to stop popping up messages when R starts?

2011-12-13 Thread S Ellison
-Original Message- Use the -q option when calling R. Thanks Michael for your reply. But how can I do that? Depends how you start R. On the command line, say 'R -q' instead of just 'R' In windows from a shortcut, modify the shortcut that you click on to start R so that the

[R] Define ARMA model

2011-12-13 Thread Kellner
Hi, is there a way in the arma function to exclude coefficients for the estimation. For example I estimated an ARMA(2,2) model to data where only the coefficients of the second order have been significant. Therefore I would like to estimate the ARMA(2,2) model without the 1,1-coefficients.

Re: [R] Boxplot of multiple vectors with different lengths

2011-12-13 Thread Ryan Utz
William, THANK YOU! This nailed it. Very much appreciate the support. R On Mon, Dec 12, 2011 at 6:12 PM, William Dunlap wdun...@tibco.com wrote: If you have already made numeric vectors called a, b, and c a - 1:10 b - sqrt(1:200) c - log2(1:500) and a character vector z containing

Re: [R] Problem with package compilation

2011-12-13 Thread Duncan Murdoch
On 11-12-13 5:16 AM, Ronaldo Reis Júnior wrote: Hi, I have a R package with some functions made all of then only with R code. I use the command R CMD build to build a package that I can install on linux, windows or mac, because all the code is only R code. But I have some problems with R

Re: [R] shorter way of coding

2011-12-13 Thread Mintewab Bezabih
Dear Sarah and R users, Thanks Sarah for the suggestion. The example you gave me works and I managed to get it to run by modifying the 'lm' to the gam command. y.list - list(y1=runif(10), y2 - runif(10), y3 - runif(10)) x1 - 1:10 x2 - c(11, 15, 17, 2, 18, 6, 7, 8, 12, 10) lapply(y.list,

Re: [R] nls start values

2011-12-13 Thread Hans W Borchers
Niklaus Fankhauser niklaus.fankhauser at cell.biol.ethz.ch writes: I'm using nls to fit periodic gene-expression data to sine waves. I need to set the upper and lower boundaries, because I do not want any negative phase and amplitude solutions. This means that I have to use the port

Re: [R] nls start values

2011-12-13 Thread Bert Gunter
Niklaus: 1. First, you mat not need to use nls at all, although I am not familiar with the port algorithm, so I could very well be wrong about this. Generally speaking, one uses time series methods (e.g. fourier analysis) to fit periodic sine waves, so you may wish to check out CRAN's TimeSeries

[R] Generating weights based on certain condition in the dataset

2011-12-13 Thread Sudhi.Upadhyaya
Dear all, My goal is to create weights. I have three covariates x1 x2 x3 These three covariates are discrete, they can only store either 1 or 0. So x1 x2 x3 -- 0 1 0 0 0 1 1 0 0 1 1 0 1 0 1 0 1 1 .. Sometimes they have missing data x1 x2 x3 -- 0 1 -

[R] Fwd: tcplot documentation in evd package

2011-12-13 Thread Mike Harwood
This issue occurs only when both the evd and ismev packages are loaded. Please retract this posting, if possible. Thank you in advance! Mike -- Forwarded message -- From: Mike Harwood harwood...@gmail.com Date: Mon, Dec 12, 2011 at 7:47 PM Subject: tcplot documentation in evd

[R] bug in glmnet 1.7.1 for multinomal when alpha=0?

2011-12-13 Thread Damjan Krstajic
Dear all, If I am not mistaken, I think that I have found a bug in glmnet 1.7.1 (latest version) for multinomial when alpha=0. Here is the code library(glmnet) Loading required package: Matrix Loading required package: lattice Loaded glmnet 1.7.1 x=matrix(rnorm(40*500),40,500)

Re: [R] How to stop popping up messages when R starts?

2011-12-13 Thread R. Michael Weylandt
And if you use RStudio it seems that this option is not currently supported: http://stackoverflow.com/questions/7771577/clear-startup-screen-in-r-rstudio (follow the links through to the RStudio forums) Michael On Tue, Dec 13, 2011 at 9:50 AM, S Ellison s.elli...@lgcgroup.com wrote:

[R] Mac shortcut for running a script

2011-12-13 Thread asafw
Hi, I wonder if there is a mac equivalent to ctrl+r shortcut for running a script line.. (I am using MAC OS X 10.7.2). I saw this post http://r.789695.n4.nabble.com/Shortcut-to-run-script-tp1016619p1016619.html but couldn't find an answer... Thanks a lot, Asaf -- View this message in

[R] How to add points to two plots parallelly ?

2011-12-13 Thread chakri
I am looking for ways to add points to three different plots in parallel. I generate three scatter plots and name them as s3d1, s3d2 and s3d3 s3d1-scatterplot3d(mtcars[,3],mtcars[,4],mtcars[,5],main=common,pch=20) s3d2-scatterplot3d(mtcars[,3],mtcars[,4],mtcars[,5],main=common,pch=20)

Re: [R] How to add points to two plots parallelly ?

2011-12-13 Thread chakri
Sorry. I did not format message properly (by mistake message was posted as HTML, but it was written in plain text ) I am looking for ways to add points to three different plots in parallel. I generate three scatter plots and name them as s3d1, s3d2 and s3d3

[R] SQL select ... where R variable

2011-12-13 Thread agent dunham
Before loading sql packages, i was wondering, once all packages required are installed, if it's possible to do from R console sth like this: SQL select v1 from sql_table where v2 in (R_variable) # being R_variable a vector Thanks in advance, u...@host.com -- View this message in

Re: [R] Boxplot of multiple vectors with different lengths

2011-12-13 Thread William Dunlap
-Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of Trevor Carey- Smith Sent: Monday, December 12, 2011 4:22 PM To: r-help@r-project.org Subject: Re: [R] Boxplot of multiple vectors with different lengths On 12/13/2011 12:14

Re: [R] shorter way of coding

2011-12-13 Thread Sarah Goslee
In exactly the same way: y.gam - lapply(y.list, function(y)gam(y~s(x1,x2, k=1))) # list of gam objects y.vis.gam - lapply(y.gam, vis.gam) # list of vis.gam outputs y.fitted - lapply(y.gam, fitted) # list of fitted values. Saraj On Tue, Dec 13, 2011 at 10:48 AM, Mintewab Bezabih

[R] snpStats imputed SNP probabilities

2011-12-13 Thread SUBIRANA CACHINERO, ISAAC
Hi, Does anybody know how to obtain the imputed SNP genotype probabilities from the snpStats package? I am interested in using an imputation method implemented in R to be further used in a simulation study context. I have found the snpStats package that seems to contain suitable functions

[R] How to compute 95%CI for OR from logistic regression?

2011-12-13 Thread 孟欣
Hi all: My data has 3 variables: age(3levels : 30y=1 30-50y=2, 50y=3) gender(Male=0, Female=1) CD4 cell count(raw lab measurement) y(1:death 0:alive) I perform logistic regression to find out the factors that influence y. result-glm(y ~ factor(age) + factor(gender) + CD4,family = binomial)

[R] Should I use nls for this?

2011-12-13 Thread xfei
Hi, I have a dataset with the following properties: Y_i ~ N(mu_i, theta * (mu_i)^2) ln(mu_i) = B'Xi theta and beta's are the parameters here. I want to come up with a model to fit the data with the above property and test that model on the built in R dataset quine. Does nls() make sense

[R] pmodels in DRC

2011-12-13 Thread PatGauthier
Dear R users, I'm a little lost on how to define pmodels for the DRC package. My goals are to produce isoboles of binary toxicity data. any tips? I really just need to know what pmodels refers to. Cheers, Pat -- View this message in context:

Re: [R] How to compute 95%CI for OR from logistic regression?

2011-12-13 Thread Weidong Gu
One simple option is to use confint function exp(confint(result)) Weidong On Tue, Dec 13, 2011 at 7:16 AM, 孟欣 lm_meng...@163.com wrote: Hi all: My data has 3 variables: age(3levels : 30y=1  30-50y=2, 50y=3) gender(Male=0, Female=1) CD4 cell count(raw lab measurement) y(1:death  0:alive)

Re: [R] nls start values

2011-12-13 Thread Gabor Grothendieck
On Tue, Dec 13, 2011 at 10:53 AM, Hans W Borchers hwborch...@googlemail.com wrote: Niklaus Fankhauser niklaus.fankhauser at cell.biol.ethz.ch writes: I'm using nls to fit periodic gene-expression data to sine waves. I need to set the upper and lower boundaries, because I do not want any

Re: [R] SQL select ... where R variable

2011-12-13 Thread Gabor Grothendieck
On Tue, Dec 13, 2011 at 10:54 AM, agent dunham crossp...@hotmail.com wrote: Before loading sql packages, i was wondering, once all packages required are installed, if  it's possible to do from R console sth like this: SQL select v1 from sql_table        where v2 in (R_variable)  # being

Re: [R] windrose color ramp issue

2011-12-13 Thread Adrienne Wootten
An update on this particular problem I've been having. It seems that the number of pedals (the bins argument of the windrose command) is somehow effecting the number of colors that will be plotted. This makes no sense since it only controls the number of pedals in the windrose not the number of

Re: [R] Mac shortcut for running a script

2011-12-13 Thread Bryan Hanson
For just running a single line? apple-return Bryan On Dec 13, 2011, at 10:19 AM, asafw wrote: Hi, I wonder if there is a mac equivalent to ctrl+r shortcut for running a script line.. (I am using MAC OS X 10.7.2). I saw this post

Re: [R] shorter way of coding

2011-12-13 Thread Mintewab Bezabih
Thanks so much Sarah. Everything worked now! Mintewab Från: Sarah Goslee [sarah.gos...@gmail.com] Skickat: den 13 december 2011 17:36 Till: Mintewab Bezabih Kopia: r-help@r-project.org Ämne: Re: [R] shorter way of coding In exactly the same way: y.gam -

Re: [R] How to compute 95%CI for OR from logistic regression?

2011-12-13 Thread Jorge I Velez
Hi there, Try require(epicalc) logistic.display(result) HTH, Jorge On Tue, Dec 13, 2011 at 7:16 AM, 孟欣 wrote: Hi all: My data has 3 variables: age(3levels : 30y=1 30-50y=2, 50y=3) gender(Male=0, Female=1) CD4 cell count(raw lab measurement) y(1:death 0:alive) I perform logistic

Re: [R] k-folds cross validation with conditional logistic

2011-12-13 Thread cberry
Terry Therneau thern...@mayo.edu writes: --begin inclusion -- I have a matched-case control dataset that I'm using conditional logistic regression (clogit in survival) to analyze. I'm trying to conduct k-folds cross validation on my top models but all of the packages I can find (CVbinary in

Re: [R] Dividing rows when time is overlapping

2011-12-13 Thread PEL
Thank you for your answer. It helps a lot and is very appreciated. Also, thanks for the advice about dput(), I was wondering how to present my data or code easily. -- View this message in context: http://r.789695.n4.nabble.com/Dividing-rows-when-time-is-overlapping-tp4170428p4191334.html Sent

[R] NA/NaN/Inf in foreign function call question

2011-12-13 Thread niki
Dear all, I have a datafile where I run haplo.GLM analyses using several variables (a matrix). However, when I include a certain binary variable (0,1) I get this message Error: NA/NaN/Inf in foreign function call (arg 4) I don't get an error when I include another binary variable, again with

Re: [R] windrose color ramp issue

2011-12-13 Thread Adrienne Wootten
The issue is solved. For those who wish to use windrose out of the circular package and have more groups magnitude than they do pedals, please note the following line in the windrose function - fill.col = rep(fill.col,length.out=bins) # where bins is the number of pedals, fill.col is the fill

Re: [R] Should I use nls for this?

2011-12-13 Thread Ben Bolker
xfei xiaoyifei at gmail.com writes: I have a dataset with the following properties: Y_i ~ N(mu_i, theta * (mu_i)^2) ln(mu_i) = B'Xi theta and beta's are the parameters here. I want to come up with a model to fit the data with the above property and test that model on the built in R

[R] plotting 2 Y-axes, aligning the 0 value

2011-12-13 Thread Frederik Vanrenterghem
Hi, Being a novice to R, I would like to create a graph in R with 2 axes. One of the 2 only has positive values, the other one also has negative values. The part I'm struggling with is how to align the 2. Rather than starting to plot the data from the x axis, I would like to start plotting the

[R] OPeNDAP access with R

2011-12-13 Thread Phil Wiles
I am in the process of converting from Matlab to R, but a major sticking point for me at the moment is accessing data via OPeNDAP. After several hours of searching, I found that other people have discussed this functionality in the past, but it does not appear to have yet been developed. One

Re: [R] OPeNDAP access with R

2011-12-13 Thread Roy Mendelssohn
The package ncdf4 (http://cran.r-project.org/web/packages/ncdf4/index.html) can access remote OpeNDAP data services. If you use Windows, the author has a binary package on his site. Also, if you want a GUI that works with R and allows you to visually select the space-time slice you want, try

Re: [R] OPeNDAP access with R

2011-12-13 Thread Michael Sumner
GDAL can do it, and so then can the rgdal package if you can compile against a GDAL including the OpenDAP driver. You get each 2+D-array (subdataset in GDAL terms) flattened into a series of 2D rasters where each slice in higher dimensions is an attribute on the raster, but that often is quite

Re: [R] Improve a browse through list items - Transform a loop to apply-able function.

2011-12-13 Thread Jean V Adams
Robin Cura wrote on 12/12/2011 10:15:32 AM: Hello, I'm currently trying to convert a slow and ugly script I made, so that it's faster and can be computed on a computer grid with the multicore package. My problem is that I don't see how to turn some loops into an apply-able function.

Re: [R] Plotting a date variable after GAM

2011-12-13 Thread Jean V Adams
Shige Song wrote on 12/12/2011 07:49:39 PM: Dear All, I am fitting a simple GAM model using the gam function in the mgcv package. The only independent variable is a continuous variable representing the time of the event (in year and month) coded so that 0 represents January 1960, 1

Re: [R] Please delete my e-mail judit.barr...@montana.edu

2011-12-13 Thread Uwe Ligges
On 12.12.2011 23:24, Barroso, Judit wrote: Please, I am receiving lot of e-mails that I do not want. Please could you delete my e-mail. I think most of us will delete it. If you want to unsubscribe, please read the footer of any message, it tells you where you can unsubscribe yourself.

Re: [R] calculating logit parameters (odd ratio is exactly one or zero)

2011-12-13 Thread Uwe Ligges
On 13.12.2011 04:36, wim nursal wrote: Dear Uwe and David, Yes, definitely i was wrong. The expression in R should be: glm(cbind(FD, 12 - FD) ~ Fsize, family=binomial, data=subFS) Call: glm(formula = cbind(FD, 12 - FD) ~ Fsize, family = binomial, data = subFS) Coefficients:

Re: [R] NA/NaN/Inf in foreign function call question

2011-12-13 Thread Uwe Ligges
Probably some division by zero is done somewhere internally. We cannot say more since this is not reproducible for us. Uwe LIgges On 13.12.2011 18:29, niki wrote: Dear all, I have a datafile where I run haplo.GLM analyses using several variables (a matrix). However, when I include a

Re: [R] plotting 2 Y-axes, aligning the 0 value

2011-12-13 Thread Jean V Adams
Frederik Vanrenterghem wrote on 12/13/2011 01:55:03 PM: Hi, Being a novice to R, I would like to create a graph in R with 2 axes. One of the 2 only has positive values, the other one also has negative values. The part I'm struggling with is how to align the 2. Rather than starting to

[R] how to manually enter an double quote as data feed?

2011-12-13 Thread bonnieyuan
I'm doing a text mining project where I have to manually enter a double quote as an element inside a vector. I tried char[10]=''#where i enclosed the double quote in a pair of single quotes. But the result is [1] \. Somehow a back slash is added automatically. I also tried to enclose the

[R] k-means cluster and plot labels

2011-12-13 Thread Meesters, Christian
Hi, For my data, I followed the example of http://en.wikibooks.org/wiki/Data_Mining_Algorithms_In_R/Clustering/K-Means#Execution and got some very nice results. Despite the fact, that I want to achieve a bit more by clustering my data (stratification beyond case-control), the actual

[R] Problem with ploting fitted values

2011-12-13 Thread matys
Hello! I have such a problem... Estimated a model based on common data (you can find it in R library), and I wanted to plot the orginal values with the estimated one. Unfortunately I can only see the original values. Below is the code with data library: / library(forecast) data(AirPassengers)

[R] Keep sourcing when there is an error

2011-12-13 Thread Ronan Maron
Hello, I want to know if there is any way to avoid source() stopping when there is an error. Here is the content of my Main.R script: source(~/R/source/Constructor1.R) # Object1 should be constructed ifelse(exists(Object1),# It's an S4 object print(Object1 exists), #

Re: [R] optimize()

2011-12-13 Thread dnz.marcio
Wow...it's so simple! I have specified the variable times. Thank you so much, Ben! -- View this message in context: http://r.789695.n4.nabble.com/optimize-tp4173920p4192278.html Sent from the R help mailing list archive at Nabble.com. __

Re: [R] Keep sourcing when there is an error

2011-12-13 Thread Sarah Goslee
Would wrapping the problematic part in try() solve your problem? On Tue, Dec 13, 2011 at 3:24 PM, Ronan Maron rona...@gmail.com wrote: Hello, I want to know if there is any way to avoid source() stopping when there is an error. Here is the content of my Main.R script:

Re: [R] Keep sourcing when there is an error

2011-12-13 Thread Bert Gunter
?try or ?tryCatch or ?withCallingHandlers -- Bert On Tue, Dec 13, 2011 at 12:24 PM, Ronan Maron rona...@gmail.com wrote: Hello, I want to know if there is any way to avoid source() stopping when there is an error. Here is the content of my Main.R script:

Re: [R] k-means cluster and plot labels

2011-12-13 Thread Sarah Goslee
Try the pch() argument to plot(), or perhaps using text(), depending on what exactly you're trying to achieve. Sarah On Tue, Dec 13, 2011 at 4:03 PM, Meesters, Christian meest...@aesku.com wrote: Hi, For my data, I followed the example of

Re: [R] Keep sourcing when there is an error

2011-12-13 Thread Ronan Maron
Okay, try(Object1 - constructorFunction(args)) # in Constructor1.R works fine. Thank you. __ 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

Re: [R] how to manually enter an double quote as data feed?

2011-12-13 Thread Justin Haynes
\ is how its displayed on the screen. however, if you write your object to a csv it will be correct. r cant display as it is so it is escaping the second double quote for you however, ' (double quote single quote double quote) does display correctly as well as save correctly. If that doesn't

Re: [R] how to manually enter an double quote as data feed?

2011-12-13 Thread Nordlund, Dan (DSHS/RDA)
-Original Message- From: r-help-boun...@r-project.org [mailto:r-help-bounces@r- project.org] On Behalf Of bonnieyuan Sent: Tuesday, December 13, 2011 2:04 PM To: r-help@r-project.org Subject: [R] how to manually enter an double quote as data feed? I'm doing a text mining project

Re: [R] Keep sourcing when there is an error

2011-12-13 Thread R. Michael Weylandt michael.weyla...@gmail.com
Also, you should probably be using if and else here rather than ifelse. Michael On Dec 13, 2011, at 5:43 PM, Ronan Maron rona...@gmail.com wrote: Okay, try(Object1 - constructorFunction(args)) # in Constructor1.R works fine. Thank you. __

[R] hclust and ggplot2

2011-12-13 Thread wwreith
I saw an example online of taking hclust dendrogram and plotting it using ggplot2 and thought I would give it a try to see what it would look like. I get an error when trying to use ggplot; Error: ggplot2 doesn't know how to deal with data of class phylo. Regular plot works fine but I can't get

Re: [R] New question

2011-12-13 Thread Jorge I Velez
Hi, Are you sure? That's not what I got: require(epicalc) ?logistic.display model0 - glm(case ~ induced + spontaneous, family=binomial, data=infert) logistic.display(model0) Logistic regression predicting case crude OR(95%CI) adj. OR(95%CI)P(Wald's test)

Re: [R] New question

2011-12-13 Thread Jorge I Velez
I forgot to mention (sorry for double posting) that str(infert) shows that induced and spontaneous are not factors: 'data.frame': 248 obs. of 8 variables: $ education : Factor w/ 3 levels 0-5yrs,6-11yrs,..: 1 1 1 1 2 2 2 2 2 2 ... $ age : num 26 42 39 34 35 36 23 32 21 28 ... $

Re: [R] New question

2011-12-13 Thread Jorge I Velez
Hi lm_mengxin, If that's the case, just use as.factor(): fit - glm(case ~ as.factor(induced) + as.factor(spontaneous), family=binomial, data=infert) logistic.display(fit) OR lower95ci upper95ci Pr(|Z|) as.factor(induced)1 1.585398 0.7972313 3.152769

Re: [R] Error

2011-12-13 Thread Virasakdi Chongsuvivatwong
logistic.display need a rather tidy model ie all independent variables must be the original name not any function of a variable in the dataset of the model. If data1 is your dataset containing y, 'gender' and 'age', what you need to do is data1$age1 - factor(data1$age) result1-glm(y ~ age1 +

Re: [R] Problem with ploting fitted values

2011-12-13 Thread Michael Bibo
matys mts89 at o2.pl writes: Hello! I have such a problem... Estimated a model based on common data (you can find it in R library), and I wanted to plot the orginal values with the estimated one. Unfortunately I can only see the original values. Below is the code with data library: /

[R] Generating input population for microsimulation

2011-12-13 Thread Emma Thomas
Hi all, I've been struggling with some code and was wondering if you all could help. I am trying to generate a theoretical population of P people who are housed within X different units. Each unit follows the same structure- 10 people per unit, 8 of whom are junior and two of whom are senior.

Re: [R] R, PostgresSQL and poor performance

2011-12-13 Thread James Cloos
BD == Berry, David d...@noc.ac.uk writes: BD All variables are reals other than id which is varchar(10) and date BD which is a timestamp, approximately 1.5 million rows are returned by BD the query and it takes order 10 second to execute using psql (the BD command line client for Postgres) and a

[R] Error

2011-12-13 Thread 孟欣
Hi sir: I follow your suggestion: result-glm(y ~ factor(age) + factor(gender) + CD4,family = binomial) logistic.display(result) Error in coeff[, 1] : incorrect number of dimensions At 2011-12-14 01:59:36,Jorge I Velez jorgeivanve...@gmail.com wrote: Hi there, Try

Re: [R] Improve a browse through list items - Transform a loop to apply-able function.

2011-12-13 Thread Klint Gore
-Original Message- From: r-help-boun...@r-project.org [mailto:r-help-bounces@r- project.org] On Behalf Of Robin Cura Sent: Tuesday December 13, 2011 3:16 AM I'm currently trying to convert a slow and ugly script I made, so that it's faster and can be computed on a computer grid

Re: [R] Problem with ploting fitted values

2011-12-13 Thread Rui Barradas
Hello, matys wrote Hello! I have such a problem... Estimated a model based on common data (you can find it in R library), and I wanted to plot the orginal values with the estimated one. Unfortunately I can only see the original values. Below is the code with data library: /

[R] New question

2011-12-13 Thread 孟欣
According to the example of logistic.display: model0 - glm(case ~ induced + spontaneous, family=binomial, data=infert) summary(model0) logistic.display(model0) induced: 3levels 0,1,2 spontaneous: 3levels 0,1,2 So if 0 is reference, we should get 2 OR for induced1, induced2, spontaneous1,

[R] predict in lmer

2011-12-13 Thread arunkumar1111
Hi Please any one help in finding the predicted value for lmer function model- lmer(formula =formula,data=data,verbose=TRUE,family = gaussian) I need to get predicted value for this model. I'm not able to get the formula Please help Thanks in advance Arun -- View this message in context:

Re: [R] How download to spreadsheet?

2011-12-13 Thread Yumin
Hello Hasan Diwan: The codes you gave, download Yahoo quotes to Excel spreadsheet, works well in my pc, too. Thank you so much. As a novice of R language, I did find that one sentence works in one package usually is not available in another package. To some reason, I am using

Re: [R] Error

2011-12-13 Thread 孟欣
Yes,I¡¡understand. Thanks for your help. At 2011-12-14 13:53:21,Virasakdi Chongsuvivatwong cvira...@gmail.com wrote: logistic.display need a rather tidy model ie all independent variables must be the original name not any function of a variable in the dataset of the model. If data1 is your

Re: [R] New question

2011-12-13 Thread 孟欣
Yes,it works well. Thanks for your help. At 2011-12-14 13:06:14,Jorge I Velez jorgeivanve...@gmail.com wrote: Hi lm_mengxin, If that's the case, just use as.factor(): fit - glm(case ~ as.factor(induced) + as.factor(spontaneous), family=binomial, data=infert) logistic.display(fit)

[R] My finding

2011-12-13 Thread 孟欣
Sir: I find out that for 2 level factor, if I set it to factor, then I'll get error reply. For the instance last mail, if I use: result1-glm(y ~ gender,family = binomial);#gender has 2 levels logistic.display(result1) Error in coeff[, 1] : incorrect number of dimensions if I use:

Re: [R] My finding

2011-12-13 Thread Jorge I Velez
lm_mengxin, Yes, it happens because you are not following what Dr. Chongsuvivatwong suggested you in a previous email. Compare yourdata$age1 - factor(yourdata$gender) result1-glm(y ~ gender + CD4,family = binomial, data=yourdata) logistic.display(result1) and fit -glm(y ~