Re: [R] Selecting 3 different hours in a day

2011-11-07 Thread Jeff Newmiller
No data sample was provided, so with a verbal description of the problem comes a verbal answer. I would use expand.grid to build a set of all desired date/time combinations, then use the merge function to select rows in your actual data. --

Re: [R] Sampling with conditions

2011-11-07 Thread Ted Harding
[Correction below (I was writing too late at night ... ] On 08-Nov-11 00:25:57, Ted Harding wrote: > On 07-Nov-11 22:22:54, SarahJoyes wrote: >> 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 samp

[R] similar package in R like "SKEW CALCULATOR"?

2011-11-07 Thread Knut Krueger
Hi to all is there a similar package like the SKEW CALCULATOR from Peter Nonacs (University of California - Department of Ecology and Evolutionary Biology) http://www.eeb.ucla.edu/Faculty/Nonacs/shareware.htm Kind Regards Knut __ R-help@r-project

Re: [R] Estimate of intercept in loglinear model

2011-11-07 Thread Mark Difford
Nov 08, 2011; 4:58am Rolf Turner wrote: >(in response to >>> Professor Colin Aitken, >>> Professor of Forensic Statistics, >!!!) > >> >> Do you suppose you could provide a data-corpse for us to dissect? >Fortune nomination!!! I think Sherlock would have said, "But it's elementary, my dea

[R] Need help for the CO_PLOT method

2011-11-07 Thread Hui Xu
Hi, I am trying to draw some figures using the CO_PLOT method mentioned by Adi Raveh (1998). This method puts observations on a two-dimensional space using multiple dimension scale method, then add arrows to the panel based on the correlation between variables. Has anyone done the co-plot work

[R] Selecting 3 different hours in a day

2011-11-07 Thread jck13
Hello, I have a csv with 5months of hourly data for 4 years. I would like to get 9am, 12pm and 3pm from each day and create a subset or a new data frame that I can analyze. The time are from hour 0-23 for each day. I am not sure how to create a loop which will take out each of these hours and cre

Re: [R] why NA coefficients

2011-11-07 Thread David Winsemius
On Nov 8, 2011, at 1:19 AM, David Winsemius wrote: On Nov 7, 2011, at 10:07 PM, array chip wrote: Thanks David. The only category that has no cases is "treat 1-group 2": > with(test,table(treat,group)) group treat 1 2 1 8 0 2 1 5 3 5 5 4 7 3 5 7 4 6 3 3 7 8 2 But

Re: [R] why NA coefficients

2011-11-07 Thread David Winsemius
On Nov 7, 2011, at 10:07 PM, array chip wrote: Thanks David. The only category that has no cases is "treat 1-group 2": > with(test,table(treat,group)) group treat 1 2 1 8 0 2 1 5 3 5 5 4 7 3 5 7 4 6 3 3 7 8 2 But why the coefficient for "treat 7-group 2" is

Re: [R] why NA coefficients

2011-11-07 Thread array chip
Hi Dennis, The cell mean mu_12 from the model involves the intercept and factor 2: Coefficients:   (Intercept) factor(treat)2 factor(treat)3  0.429244   0.499982   0.352971    

[R] Unexpected behavior when browsing list objects by name, when the object name is a substring (prefix) of an existing object that has a valid value

2011-11-07 Thread Val Athaide
> > Hi, > > The program I am writing requires me to append named objects to my > existing list objects dynamically. > > So my list object is retval. retval always has a metadatatabletype object > > createMetadata=TRUE > retval <-list() > retval$metadatatype =c("normal") > retval$metadata=NULL > > H

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

2011-11-07 Thread Petr PIKAL
Hi Dennis Yes you are completely right. Well, we use to say "Quick work is wretched work" and this is perfect example. Regards Petr > Hi Petr: > > You might want to double check your post. The OP wanted to remove > cases where *all* the variables in a row were NA. complete.cases() > eliminates

Re: [R] Intervals in function cut

2011-11-07 Thread Julio Sergio
Duncan Murdoch gmail.com> writes: ... Thanks Duncan! __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-c

[R] Rekeying value denoting NA

2011-11-07 Thread SML
I'm trying to rekey values which denote there is no values, i.e., '-999' in a dataset which contains both '-999' and NA entries. When I try the following command I get the following error: > data.frame[data.frame$MAR <= -9,"MAR"] <- NA "missing values are not allowed in subscripted assignment

Re: [R] why NA coefficients

2011-11-07 Thread array chip
Thanks David. The only category that has no cases is "treat 1-group 2": > with(test,table(treat,group)) group treat 1 2     1 8 0     2 1 5     3 5 5     4 7 3     5 7 4     6 3 3     7 8 2 But why the coefficient for "treat 7-group 2" is not estimable?   Thanks John __

Re: [R] Estimate of intercept in loglinear model

2011-11-07 Thread Rolf Turner
On 08/11/11 07:11, David Winsemius wrote: (in response to Professor Colin Aitken, Professor of Forensic Statistics, !!!) Do you suppose you could provide a data-corpse for us to dissect? Fortune nomination!!! cheers, Rolf Turner

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

2011-11-07 Thread Rolf Turner
On 08/11/11 02:40, Joshua Wiley wrote: On Mon, Nov 7, 2011 at 5:32 AM, 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? It's all in seconds. Conver

Re: [R] Rd2pdf error after 2.14 upgrade‏

2011-11-07 Thread Tyler Rinker
I have determined this is a MikTex problem and not an R problem. I apoligize for the post. > From: tyler_rin...@hotmail.com > To: r-help@r-project.org > Date: Mon, 7 Nov 2011 20:38:54 -0500 > Subject: [R] Rd2pdf error after 2.14 upgradeþ > > > > The command Rd2pdf was rather useful for open

Re: [R] Intervals in function cut

2011-11-07 Thread jim holtman
In stepping through 'cut.default' that is called, I get the following interval: -0.008 0.994 1.996 2.998 4.000 5.002 6.004 7.006 8.008 In printing out to three significant digits, you will have "(0.994, 2]" or "(2,3]" as you see in the factors. If instead you used: cut(x, b = 8, dig.l

Re: [R] Warning message interpretation

2011-11-07 Thread Duncan Murdoch
On 11-11-07 8:08 PM, eric wrote: Using the rmarketdata package and getting a warning message. What does this warning message tell me ? What could I do to eliminate or address it ? require(rdatamarket) Loading required package: rdatamarket Loading required package: zoo Warning message: In assi

Re: [R] Intervals in function cut

2011-11-07 Thread Duncan Murdoch
On 11-11-07 7:48 PM, JulioSergio wrote: When I was studying the function cut I found this example: x<- rep(0:8, tx0) x [1] 0 0 0 0 0 0 0 0 0 1 1 1 1 2 2 2 2 2 2 3 3 3 3 3 4 4 4 5 5 5 5 5 5 5 5 5 5 6 [39] 6 6 6 6 7 7 7 8 8 8 8 8 cut(x, b = 8) [1] (-0.008,0.994] (-0.008,0.994] (-0.008,0.9

[R] Rd2pdf error after 2.14 upgrade‏

2011-11-07 Thread Tyler Rinker
> The command Rd2pdf was rather useful for opening a package's manual > when you don't have access to the Internet (by using latex to pdf > conversion). However the way the function seems to operate changed at > version 2.14 of R. The noted changes listed on CRAN for this function > are as follo

[R] Intervals in function cut

2011-11-07 Thread JulioSergio
When I was studying the function cut I found this example: > x <- rep(0:8, tx0) > x [1] 0 0 0 0 0 0 0 0 0 1 1 1 1 2 2 2 2 2 2 3 3 3 3 3 4 4 4 5 5 5 5 5 5 5 5 5 5 6 [39] 6 6 6 6 7 7 7 8 8 8 8 8 > cut(x, b = 8) [1] (-0.008,0.994] (-0.008,0.994] (-0.008,0.994] (-0.008,0.994] (-0.008,0.994] [6]

[R] Warning message interpretation

2011-11-07 Thread eric
Using the rmarketdata package and getting a warning message. What does this warning message tell me ? What could I do to eliminate or address it ? require(rdatamarket) Loading required package: rdatamarket Loading required package: zoo Warning message: In assignInNamespace("as.Date.numeric", f

Re: [R] why NA coefficients

2011-11-07 Thread David Winsemius
On Nov 7, 2011, at 7:33 PM, array chip wrote: Hi, I am trying to run ANOVA with an interaction term on 2 factors (treat has 7 levels, group has 2 levels). I found the coefficient for the last interaction term is always 0, see attached dataset and the code below: test<-read.table("test.t

[R] why NA coefficients

2011-11-07 Thread array chip
Hi, I am trying to run ANOVA with an interaction term on 2 factors (treat has 7 levels, group has 2 levels). I found the coefficient for the last interaction term is always 0, see attached dataset and the code below: > test<-read.table("test.txt",sep='\t',header=T,row.names=NULL) > lm(y~factor(t

Re: [R] Sampling with conditions

2011-11-07 Thread Ted Harding
On 07-Nov-11 22:22:54, SarahJoyes wrote: > 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

Re: [R] help with formula for clogit

2011-11-07 Thread Weidong Gu
clogit needs to spell out formula plus strata, you can try modify the code ... d2=d[,c(mols,'group','Age','strata')] fo<-as.formula(paste(paste('group~','Age',sep=''),'strata(strata)',sep='+')) log.reg<-clogit(fo,data=d2) ... Weidong On Mon, Nov 7, 2011 at 10:19 AM, 1Rnwb wrote: > I would like t

Re: [R] Sampling with conditions

2011-11-07 Thread Daniel Nordlund
> -Original Message- > From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] > On Behalf Of SarahJoyes > Sent: Monday, November 07, 2011 2:23 PM > To: r-help@r-project.org > Subject: [R] Sampling with conditions > > Hey everyone, > I am at best, an amateur user of R, but

Re: [R] False Virus detection with colorspace package?

2011-11-07 Thread John C Frain
Thanks. This is exactly what I thought. The idea was to check if anyone else had detected a problem. I have since discovered http://virusscan.jotti.org which allows one to check the files using 20 different anti-virus programs. Only AVG detected a virus. The other 19 reported no problems. Best

Re: [R] False Virus detection with colorspace package?

2011-11-07 Thread Jeff Newmiller
This kind of thing is all too common. You can download the source, review the code, and build the package yourself, and compare the supplied binary with your home-built one. Chances are AVG will complain about that one too, and you can confirm the false positive. Anti virus software is not too f

[R] False Virus detection with colorspace package?

2011-11-07 Thread John C Frain
After updating to version 2.14 and copying packages from my Version 2.13.2 library I ran update.packages(checkBuilt=TRUE,ask=FALSE) to update these packages. This failed because AVG reported a virus in the "temporary" copy of colorspace.dll created during the install and the update then failed be

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 wrote: > Hey everyone, > I am at best, an amateur user of R, but I am stuck on how to set-up the > following sit

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 wrote: > Hello, > > I have RNAseq data, which I am trying to analyze with DESeq. My file (tab > delimited .txt) appears to be correct: > >>head(myfile) >      

Re: [R] RpgSQL row names

2011-11-07 Thread Gabor Grothendieck
On Mon, Nov 7, 2011 at 5:34 PM, Ben quant 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. > >> bentest

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 function

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 -

[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 p

[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) exp.vario<-variofit(v.e,ini.cov.pars=c(175226.94,139.81),cov.mod

[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 u

[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] 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] 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) = list(c('ra','rb'),c(

[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

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] 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 -31.25

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 > Sen

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 tri

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 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 <- 1.5 >    beta <- 1.

[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 reco

[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

[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 Con

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"

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. Dunne

[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 Exce

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). ## > exp(3.0445

[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 in

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]

[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 2

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 wrote: > Hi > > I have implented boxplots in my script to create box plot

[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?:")     Boxp

Re: [R] help with formula for clogit

2011-11-07 Thread Thomas Lumley
On Tue, Nov 8, 2011 at 4:19 AM, 1Rnwb 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 intended. -thomas -

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 quadrat

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 mod

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()) setwd('C:/Test/Dados/Teste'

[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 wit

[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 = odbcConnectExcel('T0

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 hel

Re: [R] Dunif and Punif

2011-11-07 Thread Peter Langfelder
On Mon, Nov 7, 2011 at 8:49 AM, michele donato 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 / (max-min) > but i

[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 l

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 wrote: > In short, the unif() distribution corresponds to the continuous > uniform distribution, not the discrete. > >

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 z

[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] 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 wrote: > 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

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 Newmil

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 hel

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:Basics: ##.#. ##.#. Live Go...

[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 "he

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 interactive

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 +costdis1^2,da

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

[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 sa

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,

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] 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<- matrix(data=NA,nrow

[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) create

[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,

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] 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] 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") an

[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 M

[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 fo

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-help@

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 m

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, I'v

[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 data

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,

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 my

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 packa

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 wrote: > Hello Michael, > > Thank you for replying to

  1   2   >