Re: [R] Select some, but not all, variables stepwise

2011-11-07 Thread AndreE
Thanks for the advice - I will consider some alternative strategies. -- View this message in context: http://r.789695.n4.nabble.com/Select-some-but-not-all-variables-stepwise-tp3990002p3998065.html Sent from the R help mailing list archive at Nabble.com.

[R] How much time a process need?

2011-11-07 Thread Alaios
Dear all, I have finished a large function that takes around 1 day to finish. I was using system.time(callmyfunction()) to measure how much time it needed to finish, my problem is that I do not know how to interpret their numbers. I was looking to convert these results to something more readably

Re: [R] How to delete only those rows in a dataframe in which all records are missing

2011-11-07 Thread Petr PIKAL
Perhaps something like this will work. df[!(rowSums(is.na(df))==NCOL(df)),] Or df[complete.cases(df),] Regards Petr Michael On Fri, Nov 4, 2011 at 9:27 AM, Jose Iparraguirre jose.iparragui...@ageuk.org.uk wrote: Hi, Imagine I have the following data frame: a -

[R] R and Google Code-In

2011-11-07 Thread Virgilio Gómez Rubio
Dear all, An application has been put forward for R to participate in Google Code-in. This is a Google's contest to introduce pre-university students (age 13-18) to the many kinds of contributions that make open source software development possible. We are looking for possible mentors and ideas

Re: [R] error message

2011-11-07 Thread Uwe Ligges
On 05.11.2011 21:00, JulianaMF wrote: Humm... I was using adegenet / ade4 packages and both R and R studio prompted the questions. Sorry, I did so many searches on R help and Adegenet help that I forgot to mention the packages I was using... Errr, what are you referring to? You also forgot

Re: [R] Error in eigen(a$hessian) : infinite or missing values in 'x'

2011-11-07 Thread Uwe Ligges
On 05.11.2011 15:08, Kristian Lind wrote: Dear R-users, I'm estimating a two- dimensional state-space model using the FKF package. The resulting log likelihood function is maximized using auglag from the Alabama package. The procedure works well for a subset of my data, but if I try to use

Re: [R] Intercepts is coming as Zero in the Mixed Models

2011-11-07 Thread Ben Bolker
arunkumar akpbond007 at gmail.com writes: I'm getting the intercepts of the Random effects as 0. Please help me to understand why this is coming Zero This is my R code Data- read.csv(C:/FE and RE.csv) Formula=Y~X2+X3+X4 + (1|State) + (0+X5|State)

Re: [R] Structural equation modeling in R(lavaan,sem)

2011-11-07 Thread Joshua Wiley
Hi, Your question is so broad as to be unanswerable, but see the help pages for the function from both packages. Here is how you can load them both and then look at the help for a specific package: require(sem) require(lavaan) help(sem, package = sem) help(sem, package = lavaan) If a

Re: [R] How much time a process need?

2011-11-07 Thread Uwe Ligges
On 07.11.2011 11:09, Alaios wrote: Dear all, I have finished a large function that takes around 1 day to finish. I was using system.time(callmyfunction()) to measure how much time it needed to finish, my problem is that I do not know how to interpret their numbers. I was looking to convert

[R] one sample Wilcoxon test using 'coin'

2011-11-07 Thread Holger Taschenberger
Hi, I'm trying to use the package 'coin' to run a one sample Wilcoxon test equivalent to this: x1-c(1,3.5,2.1,4,1.5,5) wilcox.test(x1, mu=2, exact=TRUE) I assume that I can do this like so: x2-rep(2,length(x1)) wilcoxsign_test(x1 ~ x2,distribution = exact()) But I'm not sure if this

[R] R in batch mode packages loading question

2011-11-07 Thread PALMIER Patrick (Responsable de groupe) - CETE NP/TM/ST
Hello, I use R in batch mode. Each time, I execute a script, R is loading each packages I need in my script. That's Ok But, I had to execute many scripts , and each time R is re-loading the corresponding packages, which take to much time Is it possible ask R to load the packages only once,

[R] help with programming

2011-11-07 Thread Jing Tian
 Dear moderators, Please help me encode the program instructed by follows. Thank u! Apply the methods introduced in Sections 4.2.1 and 4.2.2, say the rank-based variable selection and BIC criterions, to the Boston housing data.  The Boston housing data contains 506 observations, and

[R] How to do a target value search analogous to Excel Solver

2011-11-07 Thread jolo999
Hi all, i'm trying to find a solver possibility analogous to the Excel Solver in R. Since i just started with R, I have only little knowledge. Can someone help me by solving the problem? I have the following 'starting position': z = rnorm(1,0,1) y - function(x,z){2*x - 1 + z} I am looking for

Re: [R] error message

2011-11-07 Thread JulianaMF
As I mentioned, the archives with the exact thread were back at the lab. Here they are: read.structure(file = SimStru.str) How many genotypes are there? 820 How many markers are there? 10 Which column contains labels for genotypes ('0' if absent)? 0 Which column contains the population

[R] how save R file in exe file?

2011-11-07 Thread jesslim
I am the beginner of R. I just want to know how can i save my .R file into exe.file and that later will be execute in java. -- View this message in context: http://r.789695.n4.nabble.com/how-save-R-file-in-exe-file-tp3998352p3998352.html Sent from the R help mailing list archive at Nabble.com.

Re: [R] Help: stemming and stem completion with package tm in R

2011-11-07 Thread Felix Andrews
Hi Yanchang, The problem seems to be that stemCompletion only looks for words that begin with mine, and mining does not strictly begin with mine. I don't think there is any easy way to modify stemCompletion to get around that. However, maybe you could substitute the most prevalent word in your

Re: [R] help with programming

2011-11-07 Thread Joshua Wiley
Hi J. Tian, This list is not for helping with homework problems. Please see your instructor or teacher for assistance as it is what she or he is paid for. Cheers, Josh On Mon, Nov 7, 2011 at 3:30 AM, Jing Tian swagge...@gmail.com wrote:  Dear moderators, Please help me encode the

Re: [R] help with programming

2011-11-07 Thread David Winsemius
On Nov 7, 2011, at 6:30 AM, Jing Tian wrote:  Dear moderators, Please help me encode the program instructed by follows. Thank u! Apply the methods introduced in Sections 4.2.1 and 4.2.2, say the rank-based variable selection and BIC criterions, to the Boston housing data.  The

Re: [R] How to do a target value search analogous to Excel Solver

2011-11-07 Thread Joshua Wiley
Hi, Try this: set.seed(1) z - rnorm(1,0,1) y - function(x, z, xc){2*x - 1 + z - xc} ## uniroot finds a 0 value, so offset function by 5.5 uniroot(y, z = z, xc = 5.5, interval = c(-100, 100)) ## use the root and now no offset y(3.563227, z, 0) see ?uniroot for help Cheers, Josh On Mon, Nov

Re: [R] how save R file in exe file?

2011-11-07 Thread Uwe Ligges
On 07.11.2011 12:39, jesslim wrote: I am the beginner of R. I just want to know how can i save my .R file into exe.file and that later will be execute in java. Short answer: You cannot. Long answer: R is an interpreted language, read the manuals! Uwe Ligges -- View this message in

Re: [R] HoltWinters in R 2.14.0

2011-11-07 Thread Uwe Ligges
On 05.11.2011 06:02, TimothyDalbey wrote: You are 100% correct by my estimation however I suppose I am looking for the conditions in the data that might cause the optim() or optimize() functions to fail. Yes. I took a brief tour of the HoltWinters source but the code available

Re: [R] Kaplan Meier - not for dates

2011-11-07 Thread Terry Therneau
--- begin included message -- I have some data which is censored and I want to determine the median. Its actually cost data for a cohort of patients, many of whom are still on treatment and so are censored. I can do the same sort of analysis for a survival curve and get the median survival...

Re: [R] Kaplan Meier - not for dates

2011-11-07 Thread Polwart Calum (COUNTY DURHAM AND DARLINGTON NHS FOUNDATION TRUST)
2. The answer will be wrong. The reason is that the censoring occurs on a time scale, not a $ scale: you don't stop observing someone because total cost hits a threshold, but because calendar time does. The KM routines assume that the censoring process and the event process are on the

Re: [R] How to delete only those rows in a dataframe in which all records are missing

2011-11-07 Thread R. Michael Weylandt
Good morning Peter, No, I don't think complete cases gets what the OP wants. He wants to only throw out those rows that are entirely NA while complete.cases() gets rows with any NA's. Best, Michael 2011/11/7 Petr PIKAL petr.pi...@precheza.cz: Perhaps something like this will work.

Re: [R] survfit function?

2011-11-07 Thread Terry Therneau
Two thoughts. First, prediction with time dependent covariates is always an issue. If you had unemployment as a month-by-month time-dependent covariate in the first model, then for prediction you will need to provide a month-by-month future unemployment scenario. Doing this is easy in the code,

Re: [R] Kaplan Meier - not for dates

2011-11-07 Thread Polwart Calum (COUNTY DURHAM AND DARLINGTON NHS FOUNDATION TRUST)
2. The answer will be wrong. The reason is that the censoring occurs on a time scale, not a $ scale: you don't stop observing someone because total cost hits a threshold, but because calendar time does. The KM routines assume that the censoring process and the event process are on the

Re: [R] How much time a process need?

2011-11-07 Thread Alaios
So I just need to get the    user  system elapsed   0.460   0.048  67.366 user value and convert the seconds to days and then to hours ? Right? What about this elapsed field? From: Uwe Ligges lig...@statistik.tu-dortmund.de Cc: R-help@r-project.org

[R] function that load variables

2011-11-07 Thread Alaios
Dear all, I have saved few variable names into local files, I wanted to make a function that load this files and generates the variable names into my working environment. I have tried to do that as a function but my problem is  that this function does not return the variable names

Re: [R] How much time a process need?

2011-11-07 Thread Joshua Wiley
On Mon, Nov 7, 2011 at 5:32 AM, Alaios ala...@yahoo.com wrote: So I just need to get the    user  system elapsed   0.460   0.048  67.366 user value and convert the seconds to days and then to hours ? Right? What about this elapsed field? It's all in seconds. Convert whatever fields you

[R] R in batch mode packages loading question

2011-11-07 Thread PALMIER Patrick (Responsable de groupe) - CETE NP/TM/ST
Hello, I use R in batch mode. Each time, I execute a script, R is loading each packages I need in my script. That's Ok But, I had to execute many scripts , and each time R is re-loading the corresponding packages, which take to much time Is it possible ask R to load the packages only once,

Re: [R] How much time a process need?

2011-11-07 Thread R. Michael Weylandt
Alaios: Generally I would think you would look at the elapsed field (at least I do): consider the example you ran to give that data. Did it take about half a second or a minute? Gabor showed this example once to illustrate the difference: system.time(Sys.sleep(20)) Michael PS -- If you really

Re: [R] function that load variables

2011-11-07 Thread R. Michael Weylandt
Perhaps you mean to use load(, envir = .GlobalEnv) Currently you load up the variables in the function environment but then they are thrown away when the function ends. Michael On Mon, Nov 7, 2011 at 8:40 AM, Alaios ala...@yahoo.com wrote: Dear all, I have saved few variable names into

Re: [R] How to use 'prcomp' with CLUSPLOT?

2011-11-07 Thread R. Michael Weylandt
Happy to look at it further, but I don't have access to fitnw$cluster so i can't run clusplot, modified or unmodified. If you would, create a test data set using dput() for all the needed objects. Michael On Fri, Nov 4, 2011 at 6:18 PM, jo jfrabe...@sdsc.edu wrote: Hello Michael, Thank you

Re: [R] R in batch mode packages loading question

2011-11-07 Thread Duncan Murdoch
On 07/11/2011 5:49 AM, PALMIER Patrick (Responsable de groupe) - CETE NP/TM/ST wrote: Hello, I use R in batch mode. Each time, I execute a script, R is loading each packages I need in my script. That's Ok But, I had to execute many scripts , and each time R is re-loading the corresponding

Re: [R] How to write a shapefile with projection

2011-11-07 Thread Monica Pisica
Hi Patrick, Thanks for letting me know. I mostly use rgdal to read and write rasters so until now i kind of ignore other functionality. Unfortunately i supposed that a package dedicated to shapefiles would be the answer and had the functionality i needed. But rgdal does a nice job in saving

[R] Problem working with dates

2011-11-07 Thread Paul Miller
Hello All, I've been reading books about R for awhile now and am in the process of replicating the SAS analyses from an old report. I want to be sure that I can do all the things I need to in R before using it in my daily work. So far, I've managed to read in all my data and have done some

Re: [R] Problem working with dates

2011-11-07 Thread David Winsemius
On Nov 7, 2011, at 9:39 AM, Paul Miller wrote: Hello All, I've been reading books about R for awhile now and am in the process of replicating the SAS analyses from an old report. I want to be sure that I can do all the things I need to in R before using it in my daily work. So far,

Re: [R] nproc parameter in efpFunctional

2011-11-07 Thread bonda
Thank you very much, it works now! Best regards, J -- View this message in context: http://r.789695.n4.nabble.com/nproc-parameter-in-efpFunctional-tp3972419p3998747.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org

Re: [R] How to do a target value search analogous to Excel Solver

2011-11-07 Thread jolo999
Works fine. Thanks for the quick reply!! -- View this message in context: http://r.789695.n4.nabble.com/How-to-do-a-target-value-search-analogous-to-Excel-Solver-tp3998347p3998729.html Sent from the R help mailing list archive at Nabble.com. __

[R] How do I return to the row values of a matrix after computing distances

2011-11-07 Thread qqh5011
##Package Needed library(fields) ## Assumptions set.seed(123) nsim-5 p-2 ##Generate Random Matrix G G - matrix(runif(p*nsim),nsim,p) ##Set Empty Matraces dmax and dmin dmax- matrix(data=NA,nrow=nsim,ncol=p) dmin- matrix(data=NA,nrow=nsim,ncol=p) ## Loop to Fill dmax and dmin for(i

[R] Error: could not find function MLearn

2011-11-07 Thread horseatingweeds
I'm getting this error when I try to run the function MLearn(): Error: could not find function MLearn I have the MLInterface tools installed. But when I look for MLearn ??MLearn but I don't find it. The closest thing I find is the method MLearn_new() under MLInterfaces. I've tried replacing

Re: [R] Problem working with dates

2011-11-07 Thread R. Michael Weylandt
I think you are making the transform much more complicated than it needs to be: Suppose you have a data frame with a bunch of things that look like dates but are really factors: Then the following transform should work from factor to Date: df - as.Date(as.character(df), format = %Y/%m/%d) and

[R] Plotting a network in a star mode

2011-11-07 Thread anat
Dear R experts, I have a network constructed through an adjacency matrix (square matrix) using the network package in R. I'm interested in plotting this network, but in a star-mode, which means I have one node (the first column or row)i want to be located in the center of the network and all the

Re: [R] Error: could not find function MLearn

2011-11-07 Thread David Winsemius
On Nov 7, 2011, at 9:30 AM, horseatingweeds wrote: I'm getting this error when I try to run the function MLearn(): Error: could not find function MLearn The usual reason for a newbie not getting a function is that they failed to do one of these: library(MLInterface) require(MLInterface)

[R] help with formula for clogit

2011-11-07 Thread 1Rnwb
I would like to know if clogit function can be used as below clogit(group~., data=dataframe) When I try to use in above format it takes a long time, I would appreciate some pointers to get multiple combinations tested. set.seed(100) d=data.frame(x=rnorm(20)+5, x1=rnorm(20)+5, x2=rnorm(20)+5,

[R] Lower bounds on selfStart function not working

2011-11-07 Thread Schatzi
I adapted a selfStart function and the lower bounds are not working. The parameter b is negative, whereas I would like the lower bound to be zero. Any ideas? Thanks. Here is my code (I am still figuring out how to easily make replicable examples): A-1.75 mu-.2 l-2 b-0 x-seq(0,18,.25)

Re: [R] How do I return to the row values of a matrix after computing distances

2011-11-07 Thread David Winsemius
On Nov 7, 2011, at 8:06 AM, qqh5011 wrote: ##Package Needed library(fields) ## Assumptions set.seed(123) nsim-5 p-2 ##Generate Random Matrix G G - matrix(runif(p*nsim),nsim,p) ##Set Empty Matraces dmax and dmin dmax- matrix(data=NA,nrow=nsim,ncol=p) dmin-

Re: [R] How much time a process need?

2011-11-07 Thread Uwe Ligges
On 07.11.2011 14:32, Alaios wrote: So I just need to get the user system elapsed 0.460 0.048 67.366 user value and convert the seconds to days and then to hours ? Right? What about this elapsed field? Yes, the elapsed time in seconds. Uwe Ligges

Re: [R] R in batch mode packages loading question

2011-11-07 Thread PALMIER Patrick (Responsable de groupe) - CETE NP/TM/ST
Thank you for your response, but this is not exactly what I need We are working on a tool that automatically generate R scripts adapted to our surveys databases. When we want to do a table, we select interactively fields, associated labels, functions for an automatic crosstable for example Then,

[R] logistric regression: model revision

2011-11-07 Thread Sally Ann Sims
Hello, I am working on fitting a logistic regression model to my dataset. I removed the squared term in the second version of the model, but my model output is exactly the same. Model version 1: GRP_GLM-glm(HB_NHB~elev+costdis1^2,data=glm_1,family=binomial(link=logit)) summary(GRP_GLM)

Re: [R] Lower bounds on selfStart function not working

2011-11-07 Thread Schatzi
I tested the optim function and that is returning non-negative parameter values (meaning they are bound by the lower limits), but I think those are the starting estimates for the nlsList model which is then finding negative values for the solution. - In theory, practice and theory are the

Re: [R] R in batch mode packages loading question

2011-11-07 Thread Andrew Ziem
Try the fork() function in the package multicore (if your system supports it) Andrew -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of PALMIER Patrick (Responsable de groupe) - CETE NP/TM/ST Sent: Monday, November 07, 2011 3:49 AM

Re: [R] logistric regression: model revision

2011-11-07 Thread David Winsemius
On Nov 7, 2011, at 10:58 AM, Sally Ann Sims wrote: Hello, I am working on fitting a logistic regression model to my dataset. I removed the squared term in the second version of the model, but my model output is exactly the same. Model version 1: GRP_GLM-glm(HB_NHB~elev

Re: [R] R in batch mode packages loading question

2011-11-07 Thread Prof Brian Ripley
On Mon, 7 Nov 2011, PALMIER Patrick (Responsable de groupe) - CETE NP/TM/ST wrote: Thank you for your response, but this is not exactly what I need We are working on a tool that automatically generate R scripts adapted to our surveys databases. When we want to do a table, we select

[R] R-bash beginner

2011-11-07 Thread David A.
Hi, I am trying to run some R commands into my bash scripts and want to use shell variables in the R commands and store the output of R objects into shell variables for further usage in downstream analyses. So far I have managed the first, but how to get values out of R script? I am using

Re: [R] R-bash beginneR

2011-11-07 Thread Jeff Newmiller
This is not an R question. Use the print function in R and use backticks in bash. --- Jeff NewmillerThe . . Go Live... DCN:jdnew...@dcn.davis.ca.usBasics: ##.#. ##.#.

Re: [R] Problem working with dates

2011-11-07 Thread Paul Miller
Hi Michael and David, Thank you both for your reply to my question. Problem solved. I'm finding that my level of success with R is a little uneven thus far. I'm sometimes surprised by the things I can do, but then am even more surprised by the simple things I struggle with. Appreciate your

Re: [R] function that load variables

2011-11-07 Thread Jeff Newmiller
A much better solution is to make separate functions for each object you import, and return an object from the function to be assigned in the calling environment. This will be far less confusing to read later. --- Jeff

Re: [R] function that load variables

2011-11-07 Thread Bert Gunter
1. Full disclosure. I have not followed this thread closely. My comment concerns only: On Mon, Nov 7, 2011 at 8:35 AM, Jeff Newmiller jdnew...@dcn.davis.ca.uswrote: A much better solution is to make separate functions for each object you import, and return an object from the function to be

[R] Dunif and Punif

2011-11-07 Thread michele donato
Hi, I am trying to use dunif and runif however, I have two problems: if I do dunif(1:10, min=1, max=10) I get 10 values, which summed give me 1. I understand that the probability is computed as f(x) = 1 / (max-min) but in this case it looks wrong: I have 10 values, each one equiprobable, and

Re: [R] Dunif and Punif

2011-11-07 Thread R. Michael Weylandt
In short, the unif() distribution corresponds to the continuous uniform distribution, not the discrete. Longer: dDIST() doesn't give a pmf so summing it isn't what you are looking for: it gives a pdf. For punif() consider P\{X = 1\} when X is distributed on [1, 10]. Clearly this has probability

Re: [R] Dunif and Punif

2011-11-07 Thread R. Michael Weylandt
A point of clarification: dDIST() sometimes gives a pmf, e.g., dpois(). But dunif() is a pdf. Sorry for the typo. Michael On Mon, Nov 7, 2011 at 12:08 PM, R. Michael Weylandt michael.weyla...@gmail.com wrote: In short, the unif() distribution corresponds to the continuous uniform

[R] vars impulse responce function output

2011-11-07 Thread Richard Saba
Does anyone know if the bootstrap CI intervals generated by the irf() function (impulse response function) in the vars package are bias corrected? Thanks, Richard Saba [[alternative HTML version deleted]] __ R-help@r-project.org mailing

Re: [R] Dunif and Punif

2011-11-07 Thread Peter Langfelder
On Mon, Nov 7, 2011 at 8:49 AM, michele donato michele.don...@wayne.edu wrote: Hi, I am trying to use dunif and runif however, I have two problems: if I do dunif(1:10, min=1, max=10) I get 10 values, which summed give me 1. I understand that the probability is computed as f(x) = 1 /

Re: [R] Error: could not find function MLearn

2011-11-07 Thread horseatingweeds
Thanks Dave. I thought I had run library(MLInterface), but I looked back, and it was library(MLearn) I was running. Silly me... It's chugging away now. -- View this message in context: http://r.789695.n4.nabble.com/Error-could-not-find-function-MLearn-tp3998805p4005626.html Sent from the R

[R] Problema with Excel files

2011-11-07 Thread Silvano
Hi, I have a Excel file with three spreadsheets: PlanA, PlanB and PlanC. I'm trying to read the three spreadsheets and then adding them together. But, when I try read the PlanA there is an error message: rm(list=ls()) setwd('C:/Test/Dados/Teste') require(RODBC) Arquivo =

[R] Estimate of intercept in loglinear model

2011-11-07 Thread Colin Aitken
How does R estimate the intercept term \alpha in a loglinear model with Poisson model and log link for a contingency table of counts? (E.g., for a 2-by-2 table {n_{ij}) with \log(\mu) = \alpha + \beta_{i} + \gamma_{j}) I fitted such a model and checked the calculations by hand. I agreed

Re: [R] Problema with Excel files

2011-11-07 Thread David Winsemius
On Nov 7, 2011, at 12:57 PM, Silvano wrote: Hi, I have a Excel file with three spreadsheets: PlanA, PlanB and PlanC. I'm trying to read the three spreadsheets and then adding them together. But, when I try read the PlanA there is an error message: rm(list=ls())

Re: [R] Estimate of intercept in loglinear model

2011-11-07 Thread David Winsemius
On Nov 7, 2011, at 12:59 PM, Colin Aitken wrote: How does R estimate the intercept term \alpha in a loglinear model with Poisson model and log link for a contingency table of counts? (E.g., for a 2-by-2 table {n_{ij}) with \log(\mu) = \alpha + \beta_{i} + \gamma_{j}) I fitted such a

Re: [R] logistric regression: model revision

2011-11-07 Thread Dennis Murphy
Since you didn't provide a reproducible example, here are a couple of possibilities to check, but I have utterly no idea if they're applicable to your problem or not: * does costdis1 consist of 0's and 1's? * is costdis1 a factor? In the first model, you treat costdis1 as a pure

Re: [R] help with formula for clogit

2011-11-07 Thread Thomas Lumley
On Tue, Nov 8, 2011 at 4:19 AM, 1Rnwb sbpuro...@gmail.com wrote: I would like to know if clogit function can be used as below clogit(group~., data=dataframe) Not usefully. That syntax does not specify a strata() term, which is why the computation is very slow and probably not what you

[R] repeating a loop

2011-11-07 Thread Amit Patel
Hi I have implented boxplots in my script to create box plots BoxplotsCheck - readline(prompt = Would you like to create boxplots for any Feature? (y/n):)   if (BoxplotsCheck  == y){     BoxplotsFeature - readline(prompt = Which Feature would you like to create a Boxplot for?:)    

Re: [R] repeating a loop

2011-11-07 Thread R. Michael Weylandt
Could you just initialize RepeatPlot = y and then wrap your whole script in while(RepeatPlot == y) { ## YOUR STUFF ENDING WITH A POSSIBLE MODIFICATION OF RepeatPlot }? Michael On Mon, Nov 7, 2011 at 1:49 PM, Amit Patel amitrh...@yahoo.co.uk wrote: Hi I have implented boxplots in my script to

[R] [R-pkgs] new version 2.0-0 of the sem package

2011-11-07 Thread John Fox
Dear R users, Jarrett Byrnes and I would like to announce version 2.0-0 of the sem package for fitting observed- and latent-variable structural equation models. This is a general reworking of the original sem package (which is still available on R-Forge as package sem1). Some highlights of sem

Re: [R] Lower bounds on selfStart function not working

2011-11-07 Thread Schatzi
I ran the code again and got an error saying that the x was unknown. I don't know why I hadn't seen that error before. Anyway, I made the edits to func1 so instead of x, it is xy$x. #function to optimize func1 - function(value) { A.s - value[1] mu.s - value[2] l.s - value[3] b.s-

[R] ordination in vegan: what does downweight() do?

2011-11-07 Thread kelsmith
Can anyone point me in the right direction of figuring out what downweight() is doing? I am using vegan to perform CCA on diatom assemblage data. I have a lot of rare species, so I want to reduce the influence of rare species in my CCA. I have read that some authors reduce rare species by only

Re: [R] Estimate of intercept in loglinear model

2011-11-07 Thread Mark Difford
On Nov 07, 2011 at 9:04pm Mark Difford wrote: So here the intercept represents the estimated counts... Perhaps I should have added (though surely unnecessary in your case) that exponentiation gives the predicted/estimated counts, viz 21 (compared to 18 for the saturated model). ##

[R] Comparing Excel to R for Standard Curves

2011-11-07 Thread minda berbeco
Hello, In the past I have used Excel for creating standard curves. I recently switched to R using the lm function to create my curves instead, but find the results are slightly different even though my y-intercept and slope are the same. A friend told me that the difference was due to R and

Re: [R] Estimate of intercept in loglinear model

2011-11-07 Thread Mark Difford
On Nov 07, 2011 at 7:59pm Colin Aitken wrote: How does R estimate the intercept term \alpha in a loglinear model with Poisson model and log link for a contingency table of counts? Colin, If you fitted this using a GLM then the default in R is to use so-called treatment contrasts (i.e.

Re: [R] Doing dist on separate objects in a text file

2011-11-07 Thread jim holtman
Is this what you want: x - read.table(textConnection('Label X Y Slice + 1 Field_1_R3D_D3D_PRJ_w617.tif 348 506 1 + 2 Field_1_R3D_D3D_PRJ_w617.tif 359 505 1 + 3 Field_1_R3D_D3D_PRJ_w617.tif 356 524 1 + 4 Field_1_R3D_D3D_PRJ_w617.tif 2 0

[R] Regression-Discontinuity Analysis

2011-11-07 Thread Jose Bustos Melo
Hi everyone, In social reseach, economic and others fields Non-Equivalent Groups Analysis shows an issue when data are biased between Posttest and Pretest. Many authors talk about the Regression-Discontinuity Analysis wich is used when dispersion are different in both groups (in this case

[R] Correction in error

2011-11-07 Thread Gyanendra Pokharel
Hello R community, following is my code and it shows error, can some one fix this error and explain why this occurs? gibbs -function(m,n, theta = 0, lambda = 1){ alpha - 1.5 beta - 1.5 gamma - 1.5 x- array(0,c(m+1, 3)) x[1,1] - theta x[1,2] - lambda x[1,3]- n for(t

[R] Upgrade R?

2011-11-07 Thread Kevin Burton
I am trying to upgrade to R 2.14 from R 2.13.1 I have compied all the libraries from the 'library' directory in my existing installation (2.13.1) to the installed R 2.14. Now I want to uninstall the old installation (R 2.13.1) and I get the error: Internal Error: Cannot find utCompiledCode

Re: [R] Correction in error

2011-11-07 Thread Sarah Goslee
Hi, I see two problems right off: On Mon, Nov 7, 2011 at 3:10 PM, Gyanendra Pokharel gyanendra.pokha...@gmail.com wrote: Hello R community, following is my code and it shows error, can some one fix this error and explain why this occurs? gibbs -function(m,n, theta = 0, lambda = 1){    alpha

Re: [R] Correction in error

2011-11-07 Thread R. Michael Weylandt
The first argument to rbinom() is how many random samples you want to draw, not whatever you seem to think it is. It's not matching the size of what you mean to assign it to: in particular note that x[t-1, 3] is zero for t=3 which is where you initialize it. (I.e., you are also probably getting

Re: [R] Correction in error

2011-11-07 Thread William Dunlap
A possible third problem is that 2:m+1 is the same as (2:m) + 1 and you probably want 2:(m+1) Bill Dunlap Spotfire, TIBCO Software wdunlap tibco.com -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of Sarah Goslee Sent:

[R] Aggregate or extract function ?

2011-11-07 Thread Celine
Hi R user, I have two dataframe with different variables and coordinates : X Y sp bio3 bio5 bio6 bio13 bio14 1 -70.91667 -45.08333 0 47 194 -274712 2 -86.58333 66.25000 0 16 119 -34542 3 3 -62.58333 -17.91667 0 68 334 152 14428 4 -68.91667

Re: [R] Correction in error

2011-11-07 Thread Dennis Murphy
Hi: In your function call, x[1, 1] = theta = 0. In the first line of the loop, your rbinom() call works out to be x[2, 1] - rbinom(x[1, 3], 1, x[1, 1]) = rbinom(10, 1, 0) That likely accounts for the error message: Error in x[t, 1] - rbinom(x[t - 1, 3], 1, x[t - 1, 1]) : replacement

[R] vars impulse response function output

2011-11-07 Thread Richard Saba
Sorry about first post. This is in plain text. Does anyone know if the bootstrap CI intervals generated by the irf() function (impulse response function) in the vars package are bias corrected? Thanks, Richard Saba __ R-help@r-project.org mailing

[R] RpgSQL row names

2011-11-07 Thread Ben quant
Hello, Using the RpgSQL package, there must be a way to get the row names into the table automatically. In the example below, I'm trying to get rid of the cbind line, yet have the row names of the data frame populate a column. bentest = matrix(1:4,2,2) dimnames(bentest) =

[R] rearrange set of items randomly

2011-11-07 Thread flokke
Dear all, I hope that this question is not too weird, I will try to explain it as good as I can. I have to write a function for a school project and one limitation is that I may not use the in built function sample() At one point in the function I would like to resample/rearrange the items of my

[R] DESeq

2011-11-07 Thread Eric
Hello, I have RNAseq data, which I am trying to analyze with DESeq. My file (tab delimited .txt) appears to be correct: head(myfile) VZ_w13 VZ_w14a VZ_w14b VZ_w15a VZ_w15b VZ_w16a ENSG0253101 0 0 0 0 0 0 ENSG0223972 0

[R] geoR, variofit/likfit

2011-11-07 Thread katiab81
hi, I have a problem with the functions variofit ant likfit. I have to chose the more appropriate variogram model for my specific problem and data. I write the alghoritm has follows: library(geoR) data(wolfcamp) v.e-variog(wolfcamp)

[R] Sampling with conditions

2011-11-07 Thread SarahJoyes
Hey everyone, I am at best, an amateur user of R, but I am stuck on how to set-up the following situation. I am trying to select a random sample of numbers from 0 to 10 and insert them into the first column of a matrix (which will used later in a loop). However, I need to have those numbers add

[R] Adding lines to scatterplot odd result when creating multiple plots

2011-11-07 Thread markm0705
Dear R helpers I'm attempting to create a matrix of scatterplots with X-Y mean lines and regression lines added to each plot in the matrix. I have managed to create the first plot I would like using scatterplot but have run into an odd result when I use par() to set up the page to take multiple

Re: [R] Aggregate or extract function ?

2011-11-07 Thread Jean V Adams
Celine wrote on 11/07/2011 02:50:55 PM: Hi R user, I have two dataframe with different variables and coordinates : X Y sp bio3 bio5 bio6 bio13 bio14 1 -70.91667 -45.08333 0 47 194 -274712 2 -86.58333 66.25000 0 16 119 -34542 3 3 -62.58333

Re: [R] rearrange set of items randomly

2011-11-07 Thread David Winsemius
On Nov 7, 2011, at 4:09 PM, flokke wrote: Dear all, I hope that this question is not too weird, I will try to explain it as good as I can. I have to write a function for a school project and one limitation is that I may not use the in built function sample() At one point in the

Re: [R] RpgSQL row names

2011-11-07 Thread Gabor Grothendieck
On Mon, Nov 7, 2011 at 5:34 PM, Ben quant ccqu...@gmail.com wrote: Hello, Using the RpgSQL package, there must be a way to get the row names into the table automatically. In the example below, I'm trying to get rid of the cbind line, yet have the row names of the data frame populate a column.

Re: [R] DESeq

2011-11-07 Thread R. Michael Weylandt
This is one of those quirky R moments, try something like as.integer(as.character(DATA)). Michael On Mon, Nov 7, 2011 at 4:24 PM, Eric v_cand...@hotmail.com wrote: Hello, I have RNAseq data, which I am trying to analyze with DESeq. My file (tab delimited .txt) appears to be correct:

Re: [R] Sampling with conditions

2011-11-07 Thread Weidong Gu
Not sure this is valid that you can have 9 random samples out of 10, but the last one has to be fixed to meet the restraint, sum=10. Weidong On Mon, Nov 7, 2011 at 5:22 PM, SarahJoyes sjo...@uoguelph.ca wrote: Hey everyone, I am at best, an amateur user of R, but I am stuck on how to set-up

  1   2   >