Re: [R] Turning a variable name into a function argument

2016-06-28 Thread David Winsemius
> On Jun 28, 2016, at 6:19 PM, KMNanus wrote: > > You’ve stated my intent perfectly. I tried depress(substitute(x)) within > ggplot and it didn’t work. > > However, the solution (which I discovered about 10 minutes ago), turned out > to remarkably easy - I just assigned

Re: [R] Shorting Matrices

2016-06-28 Thread Jim Lemon
Hi Vasilis, Your question has more to do with telepathy than statistics, but I will attempt an answer anyway. You have in your possession a matrix (perhaps) named Matrix. Within are at least two columns of something, one of which contains dates. You have revealed that the other column contains

Re: [R] Turning a variable name into a function argument

2016-06-28 Thread KMNanus
You’ve stated my intent perfectly. I tried depress(substitute(x)) within ggplot and it didn’t work. However, the solution (which I discovered about 10 minutes ago), turned out to remarkably easy - I just assigned the new variable and it ran perfectly. It looks like this - myfun<-

[R] Shorting Matrices

2016-06-28 Thread Vasilis Bardakos via R-help
Hello, I'm a newbie in R and I tried to run a regression, but the data I imported are quarterly, weekly and daily.In order to simplify my task I set vars = Matrix[,2] to exclude the Dates and then I tried to short the data quarterly so I did the following k = var[seq(1,"total # of data",22)]

Re: [R] Not able to install RODBC package

2016-06-28 Thread Vivek Singh
Thanks Jeff. I used RMySQL instead and is working great. Regards, Vivek Kumar Singh PhD student, Information Systems Decision Sciences, MUMA College of Business, USF Phone- (813) 5809131 Web: http://vivek4.myweb.usf.edu/ On Tue, Jun 28, 2016 at 6:23 PM, Jeff Newmiller

Re: [R] Turning a variable name into a function argument

2016-06-28 Thread Jim Lemon
Hi Ken, As far as I can see, ggtitle accepts a single string. The help page is a bit obscure, implying that you can change the title with the "labs" function(?), but using the same explicit string in the "ggtitle" line, perhaps for didactic purposes. You seem to be asking to substitute your own

Re: [R] termplot intervals - SE or CI?

2016-06-28 Thread Duncan Murdoch
On 28/06/2016 4:53 PM, Eric Goodwin wrote: Hello, A reviewer queried what the intervals were on the termplot I provided in a report. The help file for termplot() suggests they're standard errors (se=T), but in the code the se.fit values from predict() are multiplied by 2, suggesting it's a

Re: [R] Can R read Word fonts and comments?

2016-06-28 Thread Bert Gunter
Did you try searching before posting here? -- e.g. a web search or on rseek.org ? Cheers, Bert Bert Gunter "The trouble with having an open mind is that people keep coming along and sticking things into it." -- Opus (aka Berkeley Breathed in his "Bloom County" comic strip ) On Tue, Jun 28,

Re: [R] Turning a variable name into a function argument

2016-06-28 Thread Bert Gunter
I frankly don't know what the heck you are doing but, (inline below) Bert Gunter "The trouble with having an open mind is that people keep coming along and sticking things into it." -- Opus (aka Berkeley Breathed in his "Bloom County" comic strip ) On Tue, Jun 28, 2016 at 1:46 PM, KMNanus

[R] Can R read Word fonts and comments?

2016-06-28 Thread John
Hi, From time to time I highlight the word documents with red/blue color or italic/bold fonts, and I also add comments to a file. Is there a package/function to let R extract the italic/bold blue/red words and comments from a docx/doc file? I am aware that there are a few packages reading

Re: [R] t-test for regression estimate

2016-06-28 Thread Steven Yen
Thanks John. Reason is I am doing linear transformations of many coefficients (e.g., bi / scalar). Of course I can uncover the t-statistic from the F statistic and then the standard error. Simply scaling the estimated coefficients I can also transform the standard errors. I have since found

Re: [R] Turning a variable name into a function argument

2016-06-28 Thread KMNanus
I’m trying to modify the function from outside, i.e., when I call the function. Ken kmna...@gmail.com 914-450-0816 (tel) 347-730-4813 (fax) > On Jun 28, 2016, at 5:07 PM, Greg Snow <538...@gmail.com> wrote: > > Can you edit the source of the function? or are you trying to modify an >

Re: [R] Turning a variable name into a function argument

2016-06-28 Thread KMNanus
Thanks for getting back to me. None of them work, because I’m trying to use the string in the function call - myfun(z, “string”) to replace the empty space in ggtitle. When I call myfun(z, gsub(“__”, “string (or any word)”, myfun), I get an error msg because gsub is looking for a data

[R] termplot intervals - SE or CI?

2016-06-28 Thread Eric Goodwin
Hello, A reviewer queried what the intervals were on the termplot I provided in a report. The help file for termplot() suggests they're standard errors (se=T), but in the code the se.fit values from predict() are multiplied by 2, suggesting it's a rough 95% confidence interval, is that right?

[R] Rpart plot produces no text

2016-06-28 Thread Thompson, James
I am using R Studio and am able to fit a tree with RPlot, however, the tree in the viewer has no text (see image attached). Jim Thompson This e-mail message is for the sole use of the intended recipient and may contain information that is confidential, proprietary or privileged. Any

Re: [R] t-test for regression estimate

2016-06-28 Thread Fox, John
Dear Steven, The reason that linearHypothesis() computes a Wald F or chisquare test rather than a t or z test is that the (numerator) df for the linear hypothesis need not be 1. In your case (as has been pointed out) you can get the coefficient standard error directly from the model summary.

Re: [R] Not able to install RODBC package

2016-06-28 Thread Jeff Newmiller
Try another mirror? Try the RMySQL package instead? Ask on R-sig-db? -- Sent from my phone. Please excuse my brevity. On June 28, 2016 1:36:47 PM PDT, Vivek Singh wrote: >> install.packages('RODBC') >Installing package into ‘/home/vivek/R/x86_64-pc-linux-gnu-library/3.0’

Re: [R] Not able to install RODBC package

2016-06-28 Thread Vivek Singh
Got a small fix for this issue. Sharing so that it may help others in future. options(repos='http://cran.rstudio.com/') Regards, Vivek Kumar Singh PhD student, Information Systems Decision Sciences, MUMA College of Business, USF Phone- (813) 5809131 Web: http://vivek4.myweb.usf.edu/ On Tue,

Re: [R] Not able to install RODBC package

2016-06-28 Thread Marc Schwartz
On Jun 28, 2016, at 3:36 PM, Vivek Singh wrote: > >> install.packages('RODBC') > Installing package into ‘/home/vivek/R/x86_64-pc-linux-gnu-library/3.0’ > (as ‘lib’ is unspecified) > Warning: unable to access index for repository > https://cloud.r-project.org/src/contrib >

Re: [R-es] Utilizar una application web usando R

2016-06-28 Thread Carlos Ortega
Hola, Una pregunta muy parecida salió en esta lista en enero. Hago la misma recomendación que ya hice: Mira el capítulo 9 de este libro: "Automated Data collection with R".

Re: [R] Calculating Value at Risk

2016-06-28 Thread Bert Gunter
1. Search! rseek.org is an R-centric search site that you should always try. A quick search there turned up the PerformanceAnalytics package. There may be others, too. 2. Search the cran task views. There are finance and econometrics task views that should be relevant. 3. Post on a more

[R] Calculating Value at Risk

2016-06-28 Thread T.Riedle
Dear all, As I am working on Value at Risk, I am looking for an appropriate package to calculate Value at Risk using different methods beyond the historical method. In doing so, I have found the package jvnVaR which provides several methods to calculate VaR. Nevertheless, I am interested in

[R] Not able to install RODBC package

2016-06-28 Thread Vivek Singh
> install.packages('RODBC') Installing package into ‘/home/vivek/R/x86_64-pc-linux-gnu-library/3.0’ (as ‘lib’ is unspecified) Warning: unable to access index for repository https://cloud.r-project.org/src/contrib Warning message: package ‘RODBC’ is not available (for R version 3.0.2) Please

Re: [R] Turning a variable name into a function argument

2016-06-28 Thread Greg Snow
There are several options. The option that is most like search and replace is to use the `sub` or `gsub` function (or similar functions in added packages). But you may be able to accomplish what you want even simpler by using the `paste`, `paste0`, or `sprintf` functions. On Tue, Jun 28, 2016

Re: [R] Turning a variable name into a function argument

2016-06-28 Thread KMNanus
Thanks for getting back to me, I’m sorry if I was unclear. What I’m trying to figure out is the equivalent of “find and replace” in Word. I have a function - myfun <- function(z){ ggplot(df, aes(x,y)+ geom_point() + ggtitle (“___ quick brown fox jumped over the lazy dog”)} Calling

Re: [R-es] Utilizar una application web usando R

2016-06-28 Thread Javier Marcuzzi
Estimado … Hay dos formas, una es conocer la formula de formación para predecir cristales de estruvita y oxalato, yo soy veterinario y ese tema es importante pero no me preocuparía en el sentido del núcleo de formación, en otras palabras, si conozco la cantidad de minerales, no quiere decir

Re: [R] t-test for regression estimate

2016-06-28 Thread Viechtbauer Wolfgang (STAT)
But the second column in coef(summary(ols1)) gives you the SE, so why not use that? Otherwise, you may want to look into the 'multcomp' package and its glht() function. Best, Wolfgang > -Original Message- > From: R-help [mailto:r-help-boun...@r-project.org] On Behalf Of Steven > Yen >

Re: [R] (sin asunto)

2016-06-28 Thread Jeff Newmiller
Follow the listinfo link in the footer. You should be in possession of a password with which to make changes to your subscription there. -- Sent from my phone. Please excuse my brevity. On June 28, 2016 2:46:19 AM PDT, "Monse Buenaño" wrote: >Excuse me, I want to change

Re: [R] (sin asunto)

2016-06-28 Thread Duncan Murdoch
On 28/06/2016 5:46 AM, Monse Buenaño wrote: Excuse me, I want to change my e-mail adress, where I receive your e-mails. Can you help me? Follow the link below: R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help Duncan Murdoch

[R] t-test for regression estimate

2016-06-28 Thread Steven Yen
test option for linearHypothesis in library(car) include "Chisq" and "F". I prefer a simple t-test so that I can retrieve the standard error. Any options other than linearHypothesis to test the linear hypothesis (with 1 restriction/degree of freedom)? > summary(ols1) Coefficients:

Re: [R] Turning a variable name into a function argument

2016-06-28 Thread David Winsemius
> On Jun 27, 2016, at 6:12 PM, KMNanus wrote: > > I’m inexperience but am trying to get my head around using functions to make > a number of ggplots easier to do. > > I have a function that creates a ggplot taking one input variable as an > argument. The variable name is

[R] (sin asunto)

2016-06-28 Thread Monse Buenaño
Excuse me, I want to change my e-mail adress, where I receive your e-mails. Can you help me? [[alternative HTML version deleted]] __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help

Re: [R] R intersect()

2016-06-28 Thread ch.elahe via R-help
Yes, found it. Thanks On Tuesday, June 28, 2016 4:57 PM, Duncan Murdoch wrote: On 28/06/2016 10:48 AM, ch.elahe via R-help wrote: > Hi all, > I have the following df: > > > licenseY :int 41006 41013 41044 41046 41067 41166 41202 41262 > 41274 41290 >

Re: [R] R intersect()

2016-06-28 Thread S Ellison
> licenseY :int 41006 41013 41044 41046 41067 41166 41202 41262 41274 > 41290 > licenseZ :int 41006 41013 41018 41044 41046 41067 4 41200 41262 > 41272 > ... I want a command to return me values from licenseY that are not in > intersect(). Does anyone know how should I

Re: [R] performance of do.call("rbind")

2016-06-28 Thread Sarah Goslee
On Mon, Jun 27, 2016 at 11:34 PM, Jeff Newmiller wrote: > Sarah, you make it sound as though everyone should be using matrices, even > though they have distinct disadvantages for many types of analysis. I'm saying that if you don't need the special features of a data

[R] R intersect()

2016-06-28 Thread ch.elahe via R-help
Hi all, I have the following df: licenseY :int 41006 41013 41044 41046 41067 41166 41202 41262 41274 41290 licenseZ :int 41006 41013 41018 41044 41046 41067 4 41200 41262 41272 I needed the common values in both license columns so I used :

[R-es] Utilizar una application web usando R

2016-06-28 Thread Marçal Plans
Hola Comunidad, Estoy intentado usar una application web (http://rsscalculatorforpets.royalcanin-world.com/) con R. La idea es tener los datos en R y importalos a la applicacion web y bajar los resultados otra vez a R. Alguna idea de donde puedo encontrar informacion relacionada con este tema?

Re: [R] Get the location of a numeric element in a list

2016-06-28 Thread Mohammad Tanvir Ahamed via R-help
Thanks Martin Morgan. Thats works excellent on a large data . Tanvir Ahamed Göteborg, Sweden | mashra...@yahoo.com - Original Message - From: Martin Morgan To: Mohammad Tanvir Ahamed ; R-help Mailing List

Re: [R] How to create these variables in R?

2016-06-28 Thread Duncan Murdoch
On 28/06/2016 7:34 AM, Faradj Koliev wrote: Dear all, Let’s say that I have a dataset that looks something like this: Subject YearA A 19901 A 19911 A 19921 A 19931 A 19940 A 19950 B 19901 B 19910 B 1992

[R] How to create these variables in R?

2016-06-28 Thread Faradj Koliev
Dear all, Let’s say that I have a dataset that looks something like this: Subject YearA A 19901 A 19911 A 19921 A 19931 A 19940 A 19950 B 19901 B 19910 B 19921 B

Re: [R] Get the location of a numeric element in a list

2016-06-28 Thread Martin Morgan
On 06/28/2016 03:03 AM, Mohammad Tanvir Ahamed via R-help wrote: Can any one please help me. I will apply this for a very large list, about 400k vector in a list and vector size is unequal and large Example : Input: a <- c(1,3,6,9,25,100) b<-c(10,7,20,2,25) c<-c(1,7,5,15,25,300,1000)

Re: [R] Get the location of a numeric element in a list

2016-06-28 Thread PIKAL Petr
Hi This could give you desired result, however I am not sure about performance or elegancy. which(sapply((lapply(d, "==", 1)), any)) Or you can transform it to a function fff <- function(x,a) which(sapply((lapply(x, "==", a)), any)) > fff(d, 25) [1] 1 2 3 > fff(d, 5) [1] 3 > fff(d, 1) [1] 1

Re: [R] Get the location of a numeric element in a list

2016-06-28 Thread Jim Lemon
Hi Tanvir, How about this: value<-1 (1:length(d))[unlist(lapply(lapply(d,"==",value),any))] Jim On Tue, Jun 28, 2016 at 5:03 PM, Mohammad Tanvir Ahamed via R-help wrote: > Can any one please help me. I will apply this for a very large list, about > 400k vector in a list

[R] Get the location of a numeric element in a list

2016-06-28 Thread Mohammad Tanvir Ahamed via R-help
Can any one please help me. I will apply this for a very large list, about 400k vector in a list and vector size is unequal and large Example : Input: a <- c(1,3,6,9,25,100) b<-c(10,7,20,2,25) c<-c(1,7,5,15,25,300,1000) d<-list(a,b,c) Expected outcome : # When looking for 1 in d c(1,3)

[R] R Crashes with .C

2016-06-28 Thread David .
Hi everyone, I'm a beginner in R and I'm trying to load a .dll file, named dll.dll, that's written in C, into R. It seems to work, now I want to use the functions that are stored in the .dll file and I encounter problems. I've searched for a solution or other method in manuals, here and on

Re: [R] > Understanding strip.default & strip.custom

2016-06-28 Thread Duncan Mackay
Hi Patrick does this help? dat <- data.frame(x = rnorm(12*5,0,1), y = rnorm(12*5,0,1), gp = factor(1:12)) dat$NS = ifelse(sapply(dat$gp, pmatch,flN, nomatch = 0) > 0, "Needles","Stems") dat = dat[order(dat[,"NS"]),] dat$GP = factor(1:6) xyplot(y ~ x|gp,