[R] Where does ' Setting LC_CTYPE failed, using "C" ' come from?

2018-07-16 Thread Christian
Hi, I am fighting to get rid of the messages like: During startup - Warning messages: Setting LC_CTYPE failed, using "C" Setting LC_COLLATE failed, using "C" This is annoying, because when building a package using R CMD, This message keeps cropping up. Here my R: Sys.getlocale() [1] "C"

[R] grep

2018-07-16 Thread Brian Smith
Hi, I was trying to find a pattern ("ABHD14A") in a character string ('xgen' in example below) using grepl. Note that the individual members may be separated by a semi-colon. The correct answer should return: "ABHD-ACY1 ; ABHD14A" "ABHD14A ; YYY" I have tried three approaches, but still seem a

[R] How to try different effect sizes for Fisher's exact test?

2018-07-16 Thread Kelly Wu
I am currently working on a simulation, and I would like to see what happens with various effect sizes. How would I test out different effect sizes for the Fisher's exact test with my current code? set.seed(23) # p1<-response in controls # p2<-response in treated # Generating random

Re: [R] grep

2018-07-16 Thread Ista Zahn
grep("(^| )ABHD14A( ;|$)",xgen, value = TRUE) maybe. On Mon, Jul 16, 2018 at 1:46 PM, Brian Smith wrote: > Hi, > > I was trying to find a pattern ("ABHD14A") in a character string ('xgen' in > example below) using grepl. Note that the individual members may be > separated by a semi-colon. > >

Re: [R] Making objects global in a package

2018-07-16 Thread Michael Hannon
Thanks to all for your replies. So far as I can see, there was nothing wrong with my original approach, but I've decided to stuff all the relevant definitions into a function (or functions), as this seems to make "devtools::check()" happier. -- Mike On Fri, Jul 13, 2018 at 6:54 PM, Jeff

[R] scale_y_continuous with sec.axis

2018-07-16 Thread Stats Student
Hi, I'm using scale_y_continuous with sec.axis and it's doing what I need but I don't understand how it picks which of the two series becomes the secondary. Does anyone have any insight into this? Thanks! __ R-help@r-project.org mailing list -- To

[R] Help in debugging a script

2018-07-16 Thread Frederic Ntirenganya
Dear Friends, I would like to ask for help. I am plotting monthly data as seasonal by adding particular months but I am getting an unexpected graph. What I want is why and what can be another alternative? Here is the data and R script busoro <- read.csv("G:/Fredo/PAPER/Malaria climate

Re: [R] (no subject)

2018-07-16 Thread Thierry Onkelinx
Dear Laura, I came across the anipaths package (https://cran.r-project.org/web/packages/anipaths/vignettes/anipaths.html) It might be useful for you. Best regards, ir. Thierry Onkelinx Statisticus / Statistician Vlaamse Overheid / Government of Flanders INSTITUUT VOOR NATUUR- EN BOSONDERZOEK

Re: [R] Help in debugging a script

2018-07-16 Thread Jim Lemon
Hi Frederic, You are asking for the sum of cases in the months September to December for the years 2012 to 2017. I get a plot that shows that from: plot(busoro[,"X"],busoro[,"Sep"] + busoro[,"Oct"] + busoro [,"Nov"] + busoro[,"Dec"],type="b",ylab="Malaria Cases",xlab="Year") What sort of plot

Re: [R] undo compile? (or: remove bytecode from closure)

2018-07-16 Thread Rui Barradas
Hello, Maybe the following is not the recommended way but it works (and I believe makes sense). f <- function(){} formals(f) <- formals(fc) body(f) <- body(fc) f #function (x) #{ # x <- x + 1 # pi * x #} f(1) #[1] 6.283185 Hope this helps, Rui Barradas Às 03:25 de 16-07-2018, Benjamin

[R] R and Logistic Regression Classifier for ML

2018-07-16 Thread Bill Poling
Good morning. I am looking for an R package and possibly at tutorial using Logistic Regression as the classifier in a ML algorithm. I located this URL for use with R pkg "e1071" and the SVM classifier which seems splendid, however, I cannot locate a comparable reference similarly for Logistic

Re: [R] (no subject)

2018-07-16 Thread Rui Barradas
Hello, Please repost in plain text, NO HTML formating. Also, you are missing an open parenthesis right after while: while( sum(abs(Sb-D-Sc-t(Pi))>1E-5)){ Hope this helps, Rui Barradas Às 14:25 de 15-07-2018, Atanasio Alberto Tembe Tembe escreveu: Hello! Is there anyone who can help me to

Re: [R] Help in debugging a script

2018-07-16 Thread Frederic Ntirenganya
Dear Jim, I am asking the sum of malaria cases from Sep to Dec. I am also getting the plot but which has false values. After going through them, I found that the script is giving the right results. Thanks alot. Frederic Ntirenganya Nyanza District, Data Mnager. Mobile:(+250)788757619 Email:

Re: [R] undo compile? (or: remove bytecode from closure)

2018-07-16 Thread Benjamin Tyner
Thanks Rui and Duncan, this is most helpful. On 07/16/2018 06:58 AM, Duncan Murdoch wrote: On 16/07/2018 5:31 AM, Rui Barradas wrote: Hello, Maybe the following is not the recommended way but it works (and I believe makes sense). f <- function(){} formals(f) <- formals(fc) body(f) <-

Re: [R] undo compile? (or: remove bytecode from closure)

2018-07-16 Thread Duncan Murdoch
On 16/07/2018 5:31 AM, Rui Barradas wrote: Hello, Maybe the following is not the recommended way but it works (and I believe makes sense). f <- function(){} formals(f) <- formals(fc) body(f) <- body(fc) That's not quite right: it might lose the environment of fc, if it isn't the

[R] Hierarchical Version of Bayesian Change Detection Model in JAGS

2018-07-16 Thread Llew Mills
I am trying to create a hierarchical changepoint detection model in JAGS, estimating group difference in changepoint based on individual changepoints in scores for an outcome variable (fictional in this case). I can run a non-hierarchical version of this same analysis, based on a single set of