Re: [R] help - Package: stats - function ar.ols

2024-02-23 Thread Ebert,Timothy Aaron
f Of Pedro Gavronski. Sent: Friday, February 23, 2024 5:00 AM To: Rui Barradas Cc: r-help@r-project.org; r-help-requ...@r-project.org Subject: Re: [R] help - Package: stats - function ar.ols [External Email] Hello, Thanks for the reply Rui and for pointing out that I forgot to attach my code. P

Re: [R] help - Package: stats - function ar.ols

2024-02-23 Thread Rui Barradas
Às 16:34 de 22/02/2024, Pedro Gavronski. escreveu: Hello, My name is Pedro and it is nice to meet you all. I am having trouble understanding a message that I receive when use function ar.ols from package stats, it says that "Warning message: In ar.ols(x = dtb[2:6966, ], demean = FALSE,

Re: [R] Help with spTransform() function and final plot colors

2020-05-18 Thread Poling, William via R-help
Thank you Ege, I appreciate your response. I have move this to r-sig-geo. WHP Proprietary -Original Message- From: Ege Rubak Sent: Monday, May 18, 2020 6:41 AM To: Poling, William ; r-help@r-project.org Subject: [EXTERNAL] Re: [R] Help with spTransform() function and final plot

Re: [R] Help with spTransform() function and final plot colors

2020-05-18 Thread Ege Rubak
You are more likely to get help with specific problems related to spTransform() on the dedicated list r-sig-geo. You should provide a minimal reproducible example. Your code refers to e.g. the object `tmp1b`, which we don't have. I think the spTransform() part will work with this correction: xy

Re: [R] Help with spTransform() function and final plot colors

2020-05-17 Thread Poling, William via R-help
Hello again. I also found this discussion on non-finite transformation error, however, I am not sure what to look for in the output after I apply my data? https://stackoverflow.com/questions/14880294/non-finite-transformation-detected-in-sptransform-in-rgdal-r-package str(sample) GPS.Points

Re: [R] Help with spTransform() function and final plot colors

2020-05-17 Thread Poling, William via R-help
Hello, I have found an additional problem. I should be getting 3 columns back in the xy@data at some point. $ ID : int 1 2 3 4 5 6 7 8 9 10 ... # $ Clust : int 1 1 1 1 1 1 1 1 1 1 ... This is always - 1 # $ Clust.1 : int 1 1 1 1 1 1 1 1

[R] Help with spTransform() function and final plot colors

2020-05-17 Thread Poling, William via R-help
#RStudio Version Version 1.2.1335 sessionInfo() # R version 4.0.0 Patched (2020-05-03 r78349) #Platform: x86_64-w64-mingw32/x64 (64-bit) #Running under: Windows 10 x64 (build 17763) Hello. I am running my data through a routine I found that finds clusters of data points based on distance rule.

Re: [R] Help with gsub function

2019-03-18 Thread Bill Poling
Good morning Steve. Terrific, so kind of you to follow-up. I will add that to my ever growing R bag of tips and tricks. Cheers. WHP William H. Poling, Ph.D., MPH | Manager, Revenue Development Data Intelligence & Analytics Zelis Healthcare -Original Message- From: S Ellison Sent:

Re: [R] Help with gsub function

2019-03-18 Thread S Ellison
> tb2a$TID2 <- gsub(tb2a$TID, pattern="-[0-0]{0,7}", replacement = "") Just to add something on why this didn't work ... It looks like you were trying to match a hyphen followed by a number up to seven digits. by mistake(?) you gave the digit range as [0-0] so it would repmatch a hyphen

Re: [R] Help with gsub function

2019-03-17 Thread Bill Poling
Yep, thank you Jeff, consequence of the first url I landed on asking how to do it and rushing off. All set now. Appreciate your help. WHP From: Jeff Newmiller Sent: Friday, March 15, 2019 4:00 PM To: r-help@r-project.org; Bill Poling ; r-help (r-help@r-project.org) Subject: Re: [R] Help

Re: [R] Help with gsub function

2019-03-16 Thread Bill Poling
) Subject: Re: [R] Help with gsub function If you want to remove just the hyphen, why not do sub("-", "", tb2a$TID) sub("-", "", "73-017323") [1] "73017323" Am I missing something? Peter On Fri, Mar 15, 2019 at 12:46 PM Bill Poli

Re: [R] Help with gsub function

2019-03-15 Thread Jeff Newmiller
Your pattern seems ... way overboard? Why not gsub("-", "", tb2a$TID) On March 15, 2019 12:45:27 PM PDT, Bill Poling wrote: >Good afternoon. > >sessionInfo() >#R version 3.5.3 (2019-03-11) >#Platform: x86_64-w64-mingw32/x64 (64-bit) >#Running under: Windows >= 8 x64 (build 9200) > >I am using

Re: [R] Help with gsub function

2019-03-15 Thread Peter Langfelder
If you want to remove just the hyphen, why not do sub("-", "", tb2a$TID) sub("-", "", "73-017323") [1] "73017323" Am I missing something? Peter On Fri, Mar 15, 2019 at 12:46 PM Bill Poling wrote: > > Good afternoon. > > sessionInfo() > #R version 3.5.3 (2019-03-11) > #Platform:

Re: [R] Help with gsub function

2019-03-15 Thread Ivan Krylov
On Fri, 15 Mar 2019 19:45:27 + Bill Poling wrote: Hello Bill, > tb2a$TID2 <- gsub(tb2a$TID, pattern="-[0-0]{0,7}", replacement = "") Is the pattern supposed to mean something besides the "-" you want to remove? For the problem you describe, pattern="-" should be enough. It should locate

[R] Help with gsub function

2019-03-15 Thread Bill Poling
Good afternoon. sessionInfo() #R version 3.5.3 (2019-03-11) #Platform: x86_64-w64-mingw32/x64 (64-bit) #Running under: Windows >= 8 x64 (build 9200) I am using gsub function to remove a hyphen in a 9 character column of values in order to convert it to integer. Works fine except where the

[R] help with read function in Azure Data Lake Remote environment

2018-08-06 Thread Bill Poling
Hi, Locally I am using windows: R version 3.5.1 (2018-07-02) Platform: x86_64-w64-mingw32/x64 (64-bit) Running under: Windows 7 x64 (build 7601) Service Pack 1 Locally on my laptop using RStudio I normally set my working directory and read in my csv files. setwd("C:/WHP/Appeals")

Re: [R] help with recursive function

2017-12-14 Thread William Dunlap via R-help
.@gmail.com] > Sent: Thursday, December 14, 2017 10:29 AM > To: DIGHE, NILESH [AG/2362] <nilesh.di...@monsanto.com> > Cc: r-help <r-help@r-project.org> > Subject: Re: [R] help with recursive function > > If you are trying to understand why the "stopifnot" condit

Re: [R] help with recursive function

2017-12-14 Thread DIGHE, NILESH [AG/2362]
. Nilesh From: William Dunlap [mailto:wdun...@tibco.com] Sent: Thursday, December 14, 2017 11:26 AM To: DIGHE, NILESH [AG/2362] <nilesh.di...@monsanto.com> Cc: Eric Berger <ericjber...@gmail.com>; r-help <r-help@r-project.org> Subject: Re: [R] help with recursive function

Re: [R] help with recursive function

2017-12-14 Thread William Dunlap via R-help
Sent: Thursday, December 14, 2017 10:29 AM > To: DIGHE, NILESH [AG/2362] <nilesh.di...@monsanto.com> > Cc: r-help <r-help@r-project.org> > Subject: Re: [R] help with recursive function > > If you are trying to understand why the "stopifnot" condition is met yo

Re: [R] help with recursive function

2017-12-14 Thread DIGHE, NILESH [AG/2362]
] <nilesh.di...@monsanto.com> Cc: r-help <r-help@r-project.org> Subject: Re: [R] help with recursive function If you are trying to understand why the "stopifnot" condition is met you can replace it by something like: if ( any(dat2$norm_sd >= 1) ) browser() This will put y

Re: [R] help with recursive function

2017-12-14 Thread Eric Berger
ot;, "treatment"), >> >> "\\.") %>% spread(treatment, value) %>% mutate(outlier = NA) >> >> stopifnot(!(any(data1$norm_sd >= 1))) >> >> if (!(any(data1$norm_sd >= 1))) { >> >> df1 <

Re: [R] help with recursive function

2017-12-14 Thread Eric Berger
gt; return(df1) > > } > >else { > > df2 <- recursive_funlp() > > return(df2) > > } > > } > > df3 <- recursive_funlp(dataset = dat1, func = funlp2) > > df3 > > } > &

Re: [R] help with recursive function

2017-12-14 Thread DIGHE, NILESH [AG/2362]
recursive_funlp(dataset = dat1, func = funlp2) df3 } From: DIGHE, NILESH [AG/2362] Sent: Thursday, December 14, 2017 9:01 AM To: 'Eric Berger' <ericjber...@gmail.com> Cc: r-help <r-help@r-project.org> Subject: RE: [R] help with recursive function Eric: Thanks for taking

Re: [R] help with recursive function

2017-12-14 Thread DIGHE, NILESH [AG/2362]
ic Berger [mailto:ericjber...@gmail.com] Sent: Thursday, December 14, 2017 8:17 AM To: DIGHE, NILESH [AG/2362] <nilesh.di...@monsanto.com> Cc: r-help <r-help@r-project.org> Subject: Re: [R] help with recursive function My own typo ... whoops ... !( any(dat2$norm_sd >= 1 )) On Thu,

Re: [R] help with recursive function

2017-12-14 Thread Eric Berger
My own typo ... whoops ... !( any(dat2$norm_sd >= 1 )) On Thu, Dec 14, 2017 at 3:43 PM, Eric Berger wrote: > You seem to have a typo at this expression (and some others like it) > > Namely, you write > > any(!dat2$norm_sd) >= 1 > > when you possibly meant to write > >

Re: [R] help with recursive function

2017-12-14 Thread Eric Berger
You seem to have a typo at this expression (and some others like it) Namely, you write any(!dat2$norm_sd) >= 1 when you possibly meant to write !( any(dat2$norm_sd) >= 1 ) i.e. I think your ! seems to be in the wrong place. HTH, Eric On Thu, Dec 14, 2017 at 3:26 PM, DIGHE, NILESH [AG/2362]

[R] help with recursive function

2017-12-14 Thread DIGHE, NILESH [AG/2362]
Hi, I need some help with running a recursive function. I like to run funlp2 recursively. When I try to run recursive function in another function named "calclp" I get this "Error: any(!dat2$norm_sd) >= 1 is not TRUE". I have never built a recursive function before so having trouble executing

Re: [R] Help with optim function in R, please?

2017-08-07 Thread J C Nash
I haven't tried your code, but I've seen far too many attempts like this where there is no simple call to the function with starting parameters to see if a sensible answer is returned. If you get NaN or Inf or ... that isn't sensible, then you know it is not a good idea to try further. Beyond

[R] Help with optim function in R, please?

2017-08-06 Thread fadeh Alanazi
Hi all, Many thank in advance for helping me.  I tried to fit Expectation Maximization algorithm for mixture data. I must used one of numerical method to maximize my function. I built my code but I do not know how to make the optim function run over a different value of the parameters. 

Re: [R] Help with improveProb function in Hmisc in R

2015-10-02 Thread Frank Harrell
Please note that Kirsten is cross-posting to stats.stackexchange.com creating extra work for everyone. -- Frank E Harrell Jr Professor and Chairman School of Medicine Department of *Biostatistics*

[R] Help with improveProb function in Hmisc in R

2015-10-01 Thread kirsada
Please bear with me, I am very new to R. My question is regarding the use of the improveProb function in the Hmisc package. I have two logistic models, the only difference being that the second model contains my novel marker of interest. I am trying to calculate NRI and IDI to compare models. I

Re: [R] Help with improveProb function in Hmisc in R

2015-10-01 Thread David Winsemius
On Oct 1, 2015, at 2:26 AM, kirsada wrote: > Please bear with me, I am very new to R. > > My question is regarding the use of the improveProb function in the Hmisc > package. I have two logistic models, the only difference being that the > second model contains my novel marker of interest. I am

Re: [R] Help with abs function

2015-06-14 Thread Andrés Aragón Martínez
Hi, Just do the following: tran-c(7.2) tgrid-c(7.1,7.4,7.3,7.1,7.3) tgrid-tgrid-tran tgrid [1] -0.1 0.2 0.1 -0.1 0.1 abs(tgrid[tgrid0.1]) [1] 0.2 Andrés El 12/06/2015, a las 11:01, Jeff Newmiller jdnew...@dcn.davis.ca.us escribió: FAQ 7.31

Re: [R] Help with abs function

2015-06-12 Thread Jeff Newmiller
FAQ 7.31 --- Jeff NewmillerThe . . Go Live... DCN:jdnew...@dcn.davis.ca.usBasics: ##.#. ##.#. Live Go... Live: OO#.. Dead: OO#..

Re: [R] Help with abs function

2015-06-12 Thread Sarah Goslee
Please read R FAQ 7.31. On Fri, Jun 12, 2015 at 11:39 AM, Nelson, Gary (MISC) gary.nel...@state.ma.us wrote: I have come across some odd behavior (to me) using the abs() function that I wonder if anyone can explain. Using R version 3.2.0, I created a vector of absolute values using the

[R] Help with abs function

2015-06-12 Thread Nelson, Gary (MISC)
I have come across some odd behavior (to me) using the abs() function that I wonder if anyone can explain. Using R version 3.2.0, I created a vector of absolute values using the following code: tran-c(7.2) tgrid-c(7.1,7.4,7.3,7.1,7.3) dgrid-abs(tgrid-tran) dgrid [1] 0.1 0.2 0.1 0.1 0.1

Re: [R] Help with pedigree() function in kinship2

2015-05-13 Thread Therneau, Terry M., Ph.D.
Your problem is that PatientID, FatherID, MotherID are factors. The authors of kinship2 (myself and Jason) simply never thought of someone doing this. Yes, that is an oversight. We will correct it by adding some more checks and balances. For now, turn your id variables into character or

Re: [R] help with by function

2015-05-12 Thread DIGHE, NILESH [AG/2362]
Jean: Thanks a lot!! The changes you made to the code gave me what I needed. I truly appreciate your time in correcting the code. Nilesh From: Adams, Jean [mailto:jvad...@usgs.gov] Sent: Tuesday, May 12, 2015 2:14 PM To: DIGHE, NILESH [AG/2362] Cc: r-help@r-project.org Subject: Re: [R] help

[R] help with by function

2015-05-12 Thread DIGHE, NILESH [AG/2362]
Hi, I have an anonymous function called function(x) that will run anova, run HSD.test on the model, and then sort the results. I am passing this anonymous function to the by function to get results by Isopair factor which is my index variable. Since I want to run the anova on multiple

Re: [R] help with by function

2015-05-12 Thread Adams, Jean
Nilesh, I found a couple errors in your code. First, in your by() statement you have a function to operate on the selected subset of data, which you refer to as x but then, in your aov statement you refer to data_set not x Second, your funC() statement is a function of

[R] Help with pedigree() function in kinship2

2015-05-12 Thread Jorge I Velez
Dear R-help, I am interested in plotting some pedigrees and came across the kinship2 package. What follows is an example of the pedigrees I am working with. Now, when running ## check package availability if(!require(kinship2)) install.packages('kinship2') require(kinship2) ## data to plot d

Re: [R] help please metro_hastings function

2015-02-15 Thread ARNAB KR MAITY via R-help
Hi, I have used this function before successfully. I could help you if you could provide your code. Thanks Regards,Arnab  From: hms Dreams cute_loo...@hotmail.com To: r-help@r-project.org r-help@r-project.org Sent: Saturday, February 14, 2015 6:27 AM Subject: [R] help please

Re: [R] help please metro_hastings function

2015-02-14 Thread John Kane
Kingston ON Canada -Original Message- From: cute_loo...@hotmail.com Sent: Sat, 14 Feb 2015 15:27:58 +0300 To: r-help@r-project.org Subject: [R] help please metro_hastings function Hi :)anybody can help me please I'm trying to use Metro_Hastings ( MHadaptive package)the proplem

[R] help please metro_hastings function

2015-02-14 Thread hms Dreams
Hi :)anybody can help me please I'm trying to use Metro_Hastings ( MHadaptive package)the proplem is: How can I know the covariance matrix( prop_sigma ) to enter it in Metro_Hastings: mcmc_r=Metro_Hastings(li_func=baysianlog, pars=c(1,1,1), prop_sigma

Re: [R] Help with a function [along columns]

2014-10-14 Thread Jim Lemon
that there is a function named vcf somewhere in the parent environment and you can't subset a function. Jim __ 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

[R] Help with a function [along columns]

2014-10-13 Thread Kate Ignatius
Hi all, I need help with a function. I'm trying to write a function to apply to varying number of columns in a lot of files - hence the function... but I'm getting stuck. Here it is: gt- function(x) { alleles - sapply(x, function(.) strsplit(as.character(.), /)) gt - apply(x,

Re: [R] Help with a function [along columns]

2014-10-13 Thread Kate Ignatius
Just an update to this: gtal - function(d) { alleles - sapply(d, function(.) strsplit(as.character(.), /)) gt - unlist(lapply(alleles, function(x) ifelse(identical(x[[1]], vcf[,3]) identical(x[[2]], vcf[,3]), 'RR', ifelse(identical(x[[1]], vcf[,4])

[R] Help with Cast Function

2013-11-29 Thread Burhan ul haq
Hi, This is the input data frame: ### df.1 = read.table(header=T,text= id gender WMC_alcohol WMC_caffeine WMC_no.drug RT_alcohol RT_caffeine RT_no.drug 1 1 female 3.7 3.7 3.9 488 236 371 2 2 female 6.4 7.3 7.9 607 376 349 3 3 female 4.6 7.4 7.3 643 226

Re: [R] Help with Cast Function

2013-11-29 Thread Carl Witthoft
I see your desired output has rather fewer data than the input data frame. Instead of making us pore over a bunch of numbers, can you explain exactly what filtering you wish to do to get the specific subset of {male/female} {alcohol/caffeine} you're trying to get? BHM wrote Hi, This is

Re: [R] Help with Cast Function

2013-11-29 Thread David Winsemius
On Nov 29, 2013, at 9:42 AM, Burhan ul haq wrote: Hi, This is the input data frame: ### df.1 = read.table(header=T,text= id gender WMC_alcohol WMC_caffeine WMC_no.drug RT_alcohol RT_caffeine RT_no.drug 1 1 female 3.7 3.7 3.9 488 236 371 2 2

Re: [R] Help with Cast Function

2013-11-29 Thread Burhan ul haq
Hi, First, a big thanks to all those who replied. I am including all the replies in one email for easier reference later: # Input from David # reshape(df.1, idvar=1:2, sep=_, direction=long, varying=names(df.1)[3:8]) # # Input from Dennis # dfr1 - reshape(df.1, idvar = c(id, gender),

Re: [R] Help for a function

2013-08-29 Thread Rui Barradas
j...@bitwrit.com.au Cc : anoumou teko_maur...@yahoo.fr; r-help@r-project.org Envoyé le : Mercredi 5 décembre 2012 16h26 Objet : Re: [R] Help for a function Hello, Also, t1 and min(xt) do not vary inside the loop so if it enters the loop it never exits. And res1[j] -(a*h) res2 -sum

[R] Help with dataEllipse function

2013-04-26 Thread Jana Makedonska
Hi Everyone, I am working with the R function dataEllipse. I plot the 95% confidence ellipses for several different samples in the same plot and I color-code the ellipse of each sample, but I do not know how to specify a different line pattern for each ellipse. I can only modify the pattern for

Re: [R] Help with dataEllipse function

2013-04-26 Thread John Fox
Dear Jana, The lty argument to dataEllipse() (in the car package) isn't vectorized. It could be, and I'll add that as a feature request. Actually, lty isn't an explicit argument to dataEllipse(); it's simply passed through to the lines() function, which draws the ellipses. You should be able

Re: [R] Help with dataEllipse function

2013-04-26 Thread Michael Friendly
On 4/25/2013 8:00 PM, Jana Makedonska wrote: Hi Everyone, I am working with the R function dataEllipse. I plot the 95% confidence ellipses for several different samples in the same plot and I color-code the ellipse of each sample, but I do not know how to specify a different line pattern for

[R] Help with merge function

2013-04-26 Thread Catarina Ferreira
Dear all, I'm trying to merge 2 dataframes, but I'm not being entirely successful and I can't understand why. Dataframe x1 State_prov Shape_name bob2009 bob 2010 bob2011 Nova ScotiaAnnapolis 0 0 1 Nova ScotiaAntigonish0

Re: [R] Help with merge function

2013-04-26 Thread Rui Barradas
Hello, The following seems to do the trick. x1 - structure(list(State_prov = c(Nova Scotia, Nova Scotia, Nova Scotia ), Shape_name = c(Annapolis, Antigonish, Gly), bob2009 = c(0L, 0L, NA), bob2010 = c(0L, 0L, NA), bob2011 = c(1L, 0L, NA)), .Names = c(State_prov, Shape_name, bob2009, bob2010,

Re: [R] Help with merge function

2013-04-26 Thread Catarina Ferreira
Hello, Thank you for your help. However the dataframes I gave you were only examples, the actual dataframes are very big. Does this mean I have to write every range of data for each variable?? On Fri, Apr 26, 2013 at 2:25 PM, Rui Barradas ruipbarra...@sapo.pt wrote: Hello, The following

Re: [R] Help with merge function

2013-04-26 Thread arun
-project.org Cc: Sent: Friday, April 26, 2013 1:10 PM Subject: [R] Help with merge function Dear all, I'm trying to merge 2 dataframes, but I'm not being entirely successful and I can't understand why. Dataframe x1 State_prov    Shape_name  bob2009  bob 2010  bob2011 Nova Scotia    Annapolis

Re: [R] Help with merge function

2013-04-26 Thread Rui Barradas
Hello, I don't understand the question, what range? I've just changed the 'all' argument to 'all.y', without doing anything special to the variables. Can you explain what you mean? Rui Barradas Em 26-04-2013 19:30, Catarina Ferreira escreveu: Hello, Thank you for your help. However the

Re: [R] Help with merge function

2013-04-26 Thread arun
#3 Nova Scotia    Gly   0   0  NA   2   1 A.K. From: Catarina Ferreira catferre...@gmail.com To: arun smartpink...@yahoo.com Sent: Friday, April 26, 2013 2:23 PM Subject: Re: [R] Help with merge function Hello, I didn't realize

Re: [R] Help with merge function

2013-04-26 Thread arun
...@yahoo.com Sent: Friday, April 26, 2013 4:20 PM Subject: Re: [R] Help with merge function here they are. As you see the NS_update is data for only 1 province and I want it to add this data to the bigger file (data), merging the common columns and adding the new columns. But what it is doing

[R] Help with lmRob function

2013-04-03 Thread Mark Chaffin
Hi, I am fairly new to R and have encountered an issue with the lmRob function that I have been unable to resolve. I am trying to run a robust regression using the lmRob function which runs successfully, but the results are rather strange. I'm not sure it's important, but my model has 3

[R] help with simple function

2013-03-17 Thread Miguel Eduardo Delgado Burbano
hello all I am writing a quite simple script to study dental wear patterns in humans and I wrote this function sqrt(var(Y1)+var(Y2))^2-4(var(Y1)*(var(Y2)-cov(Y1,Y2)^2)) but appear this error message Error: attempt to apply non-function alternatively I wrote this

Re: [R] help with simple function

2013-03-17 Thread Berend Hasselman
On 17-03-2013, at 16:47, Miguel Eduardo Delgado Burbano mdelgadoburb...@gmail.com wrote: hello all I am writing a quite simple script to study dental wear patterns in humans and I wrote this function sqrt(var(Y1)+var(Y2))^2-4(var(Y1)*(var(Y2)-cov(Y1,Y2)^2)) but appear this error

Re: [R] help with simple function

2013-03-17 Thread arun
Hi,  Y1- 1:4  Y2- 5:8 sqrt(var(Y1)+var(Y2)^2)-4*((var(Y1)*(var(Y2)-cov(Y1,Y2)^2))) #[1] 9.515593 A.K. - Original Message - From: Miguel Eduardo Delgado Burbano mdelgadoburb...@gmail.com To: r-help@r-project.org Cc: Sent: Sunday, March 17, 2013 11:47 AM Subject: [R] help with simple

Re: [R] help with simple function

2013-03-17 Thread Rui Barradas
Hello, You are missing a '*' in your first try. (As for the second, in R parenthesis are round, not []) sqrt(var(Y1) + var(Y2))^2 - 4*(var(Y1)*(var(Y2) - cov(Y1, Y2)^2)) This written as a function becomes fun - function(Y1, Y2) sqrt(var(Y1) + var(Y2))^2 - 4*(var(Y1)*(var(Y2) - cov(Y1,

Re: [R] Help with a function and text

2013-03-07 Thread Eliano
Thanks for that. Eliano 2013/3/7 David Winsemius [via R] ml-node+s789695n4660565...@n4.nabble.com On Mar 6, 2013, at 3:44 PM, Eliano wrote: Thanks. Btw are you able to help with my issue? Thanks, Eliano I'm sorry, I was too busy answering the question from 'Eliano' over on

Re: [R] Help with a function and text

2013-03-06 Thread Eliano Marques
Hi, can I understand why this message was rejected ? Thanks, Eliano Sent from my iPhone On 6 Mar 2013, at 19:18, Eliano eliano.m.marq...@gmail.com wrote: Hi everyone, I am writing some code to generate a function. I am passing that code to a dataset which i'm importing in R, e.g.

Re: [R] Help with a function and text

2013-03-06 Thread David Winsemius
On Mar 6, 2013, at 11:25 AM, Eliano Marques wrote: Hi, can I understand why this message was rejected ? Thanks, Eliano First hit on a Markmail search: http://markmail.org/message/5xog3ayx4amprsdx?q=list:org%2Er-project%2Er-help+nabble+rejected -- David. Sent from my iPhone On 6 Mar

Re: [R] Help with a function and text

2013-03-06 Thread Eliano
Thanks. Btw are you able to help with my issue? Thanks, Eliano Sent from my iPhone On 6 Mar 2013, at 23:41, David Winsemius [via R] ml-node+s789695n4660547...@n4.nabble.com wrote: On Mar 6, 2013, at 11:25 AM, Eliano Marques wrote: Hi, can I understand why this message was rejected ?

Re: [R] Help with a function and text

2013-03-06 Thread David Winsemius
On Mar 6, 2013, at 3:44 PM, Eliano wrote: Thanks. Btw are you able to help with my issue? Thanks, Eliano I'm sorry, I was too busy answering the question from 'Eliano' over on StackOverflow. I didn't have time to address this one. (Please do note that cross-posting questions to Rhelp is

Re: [R] Help for a function

2012-12-05 Thread Rui Barradas
Hello, Also, t1 and min(xt) do not vary inside the loop so if it enters the loop it never exits. And res1[j] -(a*h) res2 -sum( res1[j]) is equivalent to res2 - a*h so the inner-most loop is not needed at all. Hope this helps, Rui Barradas Em 05-12-2012 04:20, Jim Lemon

Re: [R] Help for a function

2012-12-05 Thread teko maurice
  De : Rui Barradas ruipbarra...@sapo.pt À : Jim Lemon j...@bitwrit.com.au Envoyé le : Mercredi 5 décembre 2012 16h26 Objet : Re: [R] Help for a function Hello, Also, t1 and min(xt) do not vary inside the loop so if it enters the loop it never exits. And     res1[j] -(a*h

Re: [R] Help for a function

2012-12-05 Thread teko maurice
-project.org Envoyé le : Mercredi 5 décembre 2012 16h45 Objet : Re: [R] Help for a function Thanks you all   Maurice TEKO   Biostatisticien,Doctorant. Université de Liège Département des Sciences et Gestion de l'environnement 185 avenue de Longwy 6700 Arlon (Belgique) :anoumou.tekoahate

[R] Help for a function

2012-12-04 Thread anoumou
Hello all, I need a help. I am modeling a disease and a create a R function like that: Lambda-function (x,date1,r,h,a){ ndate1 - as.Date(date1, %d/%m/%Y) t1 - as.numeric(ndate1) x[order(x$i),] t -x[,t] i -x[,i] CONTAGIEUX -x[,CONTAGIEUX] while ( t1 min(t) ){ for (i in 1:length(i)

Re: [R] Help for a function

2012-12-04 Thread Jeremy Miles
What are you expecting? What do you get? What is the problem? J On 4 December 2012 06:01, anoumou teko_maur...@yahoo.fr wrote: Hello all, I need a help. I am modeling a disease and a create a R function like that: Lambda-function (x,date1,r,h,a){ ndate1 - as.Date(date1, %d/%m/%Y) t1

Re: [R] Help for a function

2012-12-04 Thread Jim Lemon
On 12/05/2012 01:01 AM, anoumou wrote: Hello all, I need a help. I am modeling a disease and a create a R function like that: ... But i do not get the results,i try by all means but i d'ont understant the problem. Hi anoumou, Your function provides almost no indication of what two of its five

Re: [R] Help with predict function in glm

2012-11-26 Thread Rui Barradas
Hello, Why mail a question just to me? Post to the list and the odds of getting more answers (and better) are bigger. As for your question, the problem is in the call to glm, you don't need the prefix 'train$' in the formula, the argument 'data' solves that and when predicting R will look for

Re: [R] Help with predict function in glm

2012-11-26 Thread genome1976
That did it! Thanks so much as always. I emailed the question to you because I think you are an R expert based on all the suggestions, feedback and codes I have received from you in the past. Yes, I do look for answers in the open forum but when it comes to a question for which the

[R] Help with glht function and binary data!

2012-11-20 Thread Jessica McLachlan
Hi, I carried out an experiment, using a repeated measures design, in which I broadcast 6 playbacks to 15 nests. I am trying to run a posthoc pairwise comparison on a binomial GLMM with missing data points to determine which playback treatments differ. The response variable (Response) is

Re: [R] help using optim function

2012-10-24 Thread Ben Bolker
tmuman mumantariq at gmail.com writes: Hi, am very new to R and I've written an optim function, but can't get it to work least.squares.fitter-function(start.params,gr, low.constraints,high.constraints,model.one.stepper,data,scale,ploton=F) { result-optim(par=start.params,

[R] help using optim function

2012-10-23 Thread tmuman
Hi, am very new to R and I've written an optim function, but can't get it to work least.squares.fitter-function(start.params,gr,low.constraints,high.constraints,model.one.stepper,data,scale,ploton=F) {

[R] help on plotfit function in package nlstools

2012-09-12 Thread Yi Li
I encountered this problem when I was learning nonlinear regression with R : there is this function plotfit in package nlstools,which displays a superimposed plot of the dependent variable versus one the independent variables together with the fitted model.,but when I execute the example given in

Re: [R] help with rle function on paired data

2012-06-09 Thread raishilpa
hello, I have a question regarding the function WebCorpus..When I am using this function its showing error: couldnt find the function...I have downloaded the tm package...Can you help me in this regard? Also I want to know how we can data/information about a product or topic from google,facebook

Re: [R] help with rle function on paired data

2012-06-09 Thread William Dunlap
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 Steve E. Sent: Friday, June 08, 2012 2:33 PM To: r-help@r-project.org Subject: [R] help with rle function on paired data

Re: [R] Help with permutation function from Turner et al. 2010 (Ecology)

2012-06-09 Thread Uwe Ligges
On 09.06.2012 03:57, Ashley Stasko wrote: Hello, I'm using R code that includes a residual permutation that was written as a supplement to the paper: Turner et al. 2010. A general hypothesis-testing framework for stable isotopes ratios in ecological studies. Ecology 91:2227-2233. The

Re: [R] Help with permutation function from Turner et al. 2010 (Ecology)

2012-06-09 Thread mlcollyer
Dear Ashley, I am one of the co-authors for these scripts. I just downloaded the example files from the ESA archives and ran in naively on some data and it worked fine. My guess is that the problem lies in a portion of the script that you did not provide. If I had to be more certain with my

[R] help with rle function on paired data

2012-06-08 Thread Steve E.
Dear R Community - I hope you might be able to provide some guidance regarding the use of the rle function. I have a set of time-series data where a measured value is recorded every 30 seconds after the start of an experiment. Many of the measured values repeat and I am interested only in the

Re: [R] help with rle function on paired data

2012-06-08 Thread Peter Ehlers
On 2012-06-08 14:33, Steve E. wrote: Dear R Community - I hope you might be able to provide some guidance regarding the use of the rle function. I have a set of time-series data where a measured value is recorded every 30 seconds after the start of an experiment. Many of the measured values

[R] Help with permutation function from Turner et al. 2010 (Ecology)

2012-06-08 Thread Ashley Stasko
Hello, I'm using R code that includes a residual permutation that was written as a supplement to the paper: Turner et al. 2010. A general hypothesis-testing framework for stable isotopes ratios in ecological studies. Ecology 91:2227-2233. The supplemental code is available at:

[R] Help for numericDeriv function

2012-05-18 Thread Cengiz Zopluoğlu
Hi, I am stuck on something for a couple days, I am almost about to give up. This looks simple, but I can't figure out. I hope I can get some help here. I am trying to do some symbolic and numerical derivations. Let me explain the problem. Let's say, I have a matrix as follows: load -

Re: [R] Help for numericDeriv function

2012-05-18 Thread Cengiz Zopluoğlu
I missed a couple line of codes in the previous e-mail. Here is whole code again: load - matrix(c(3,0,1,4,1,3),nrow=3,ncol=2,byrow=TRUE) l - matrix(nrow=nrow(load),ncol=ncol(load)) for(i in 1:nrow(load)) { for(j in 1:ncol(load)) { l[i,j]=paste(l,i,j,sep=)}} for(i in 1:nrow(load)){ for(j in

Re: [R] Help for numericDeriv function

2012-05-18 Thread William Dunlap
-boun...@r-project.org] On Behalf Of Cengiz Zopluoglu Sent: Friday, May 18, 2012 11:33 AM To: r-help@r-project.org Subject: Re: [R] Help for numericDeriv function I missed a couple line of codes in the previous e-mail. Here is whole code again: load - matrix(c(3,0,1,4,1,3),nrow=3,ncol=2

Re: [R] Help with V function in igraph

2012-05-14 Thread Gábor Csárdi
Something weird must be going on in your s641_social object. Can you just simply check that the vertex names look OK with 'V(s641_social)$name'? If they look good, then can you send me the s641_social object in private? (Or part of it, assuming a part is enough to reproduce the problem.) Best,

Re: [R] Help with V function in igraph

2012-05-14 Thread bmccowan
Thank for your response. It is oddly working now. Thanks again, Brenda On 5/14/12 10:36 AM, Gábor Csárdi-2 [via R] ml-node+s789695n4629973...@n4.nabble.com wrote: Something weird must be going on in your s641_social object. Can you just simply check that the vertex names look OK with

[R] Help with V function in igraph

2012-05-12 Thread bmccowan
I am using the code below to output some network measures: central_social - data.frame(V(s641_social)$name, indegree_social, outdegree_social, incloseness_social, outcloseness_social, betweenness_social, eigen_social) and I get the following error: Error in Re(z) : non-numeric argument to

Re: [R] Help with gsub function or a similar function

2012-04-06 Thread Sarah Goslee
You don't provide a reproducible example, or even str(), but I'd guess you need to match ^15 instead of just 15. Sarah On Apr 5, 2012, at 10:38 PM, ieatnapalm era...@tulane.edu wrote: Hey, sorry if this has been addressed before, but I'm really new to R and having trouble with the gsub

[R] Help with gsub function or a similar function

2012-04-05 Thread ieatnapalm
Hey, sorry if this has been addressed before, but I'm really new to R and having trouble with the gsub function. I need a way to make this function exclude certain values from being substituted: ie my data looks something like (15:.0234,10:.0157) and I'm trying to replace the leading 15 with

Re: [R] Help with gsub function or a similar function

2012-04-05 Thread David Winsemius
On Apr 5, 2012, at 10:38 PM, ieatnapalm wrote: Hey, sorry if this has been addressed before, but I'm really new to R and having trouble with the gsub function. I need a way to make this function exclude certain values from being substituted: ie my data looks something like

  1   2   3   >