[R] Antwort: Re: Antwort: Re: Antwort: Re: Installing from source on Windows 7: tibble [RE OPENED]

2016-06-29 Thread G . Maubach
Hi Duncan, I would not have changed the COMPILED_BY option unless I thought I have to. In my "C:\R-Project\Rtools\mingw_32\bin" I have c++.exe g++.exe gcc.exe i686-w64-mingw32-c++.exe i686-w64-mingw32-g++.exe i686-w64-mingw32-gcc-4.9.3.exe i686-w64-mingw32-gcc.exe In my "C:\R-Project\Rtools\m

Re: [R] Bestglm subset analysis

2016-06-29 Thread Jim Lemon
Hi Doug, To expand a bit on what Bert has written, all the the "best subset/best model" procedures use random variation in the dataset to produce a result. This means that you will almost certainly include variables in your "best model" that cannot be replicated. Sometimes you can see this as a var

[R] Can I increase the size of an asterisk in plotmath()?

2016-06-29 Thread Rolf Turner
I am trying to plot an expression of the form "p^*" --- a bold letter p with the asterisk as a superscript. I can get *something* with code of the form plot(1:10) text(7.5,2.5,expression(paste(bolditalic(p)^"*"))) but the asterisk that appears is *tiny*. Is there any way to increase its siz

Re: [R] Bestglm subset analysis

2016-06-29 Thread Bert Gunter
This is a statistics question, which is largely off topic on this list. However, I'll give you a very brief OT response: I would strongly suggest you consult a local statistician to explain to why what you are doing is likely to result in complete nonsense (best subset of 5 or 6 from 21 predictors

Re: [R] ggplot2 stat_smooth

2016-06-29 Thread Nathan Pace
I appreciate the pointers. I am using ggplot2 2.1.0, but I was looking at the wrong version of the web page example documentation. The easiest way is to define the function binomial_smooth <- function(...) { geom_smooth(method = "glm", method.args = list(family = "binomial"), ...) } And th

Re: [R] Understanding and predict round-off errors sign on simple functions

2016-06-29 Thread MacQueen, Don
For all practical purposes, the differences are zero. If you want them to also look like zero, try round( m - mma , 3) or signif( m - mma , 3) (or some number of digits other than three; I picked 3 rather arbitrarily) For anticipating the sign of these minuscule differences, I doubt there

[R] data.table: “group counter” with NAs

2016-06-29 Thread Marine Regis
Hello, I would like to add a counter column in a data frame based on a set of identical rows. To do this, I tested: DF = data.table(x=c("a","a","a","b","c","d","e","f","f"), y=c(1,3,2,8,8,4,NA,NA,NA)) DF[ , Index := .GRP, by = c("y") ] DF However, the rows with NAs are considered to be ide

[R] Bestglm subset analysis

2016-06-29 Thread D Wolf via R-help
Hello All, I am working on a linear regression model and trying to find the best subset of variables for my dataset. I have 21 predictors, 1 response variable, and 79 observations. I need to find the best 5 or 6 predictors for my model. I've used leaps for lm() and I'm now trying bestglm for glm

Re: [R] ggplot2 stat_smooth

2016-06-29 Thread David Winsemius
> On Jun 29, 2016, at 2:17 PM, Nathan Pace wrote: > > I want to add a logistic plot to data. > > My call to ggplot is: > > > ggplot(data = SSI.dt, aes(x = elapsed, y = 1 - control)) + geom_point() + > stat_smooth(method = 'glm', family = binomial) + > xlab('Surgery Duration (min)') + ylab('Pr

Re: [R] [FORGED] Re: a new df with one combined column

2016-06-29 Thread Rolf Turner
On 30/06/16 02:08, Ulrik Stervbo wrote: Then I don't understand what you want to achieve. If you want to combine the two columns you can do c(df1$col1, df2$col2) It is indeed difficult to understand what the OP wants to do. Perhaps he/she wants to *paste* the two columns together? In whic

Re: [R] linking vignettes in a man page

2016-06-29 Thread Duncan Murdoch
On 29/06/2016 4:49 PM, Christophe Dutang wrote: Dear list, How can I link a vignette of a package in a man page (Rd files)? I try \link[=pkgname/doc/filename]{a name} without success. The link gives the following error message: Only help files, NEWS, DESCRIPTION and files under doc/ and demo/

[R] ggplot2 stat_smooth

2016-06-29 Thread Nathan Pace
I want to add a logistic plot to data. My call to ggplot is: ggplot(data = SSI.dt, aes(x = elapsed, y = 1 - control)) + geom_point() + stat_smooth(method = 'glm', family = binomial) + xlab('Surgery Duration (min)') + ylab('Probability SSI') + labs(title = 'THA Surgical Site Infections') ggsave(f

Re: [R] linking vignettes in a man page

2016-06-29 Thread Bert Gunter
Please post this on R-package-devel, not here. 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 Wed, Jun 29, 2016 at 1:49 PM, Christophe Dutang

Re: [R] t-test for regression estimate

2016-06-29 Thread Fox, John
Dear Steven, > -Original Message- > From: Steven Yen [mailto:sye...@gmail.com] > Sent: June 29, 2016 9:48 AM > To: Fox, John > Cc: R-help ; Sandy Weisberg (sa...@umn.edu) > > Subject: Re: [R] t-test for regression estimate > > Also, > Is there a way to get the second command (hypothesis

[R] linking vignettes in a man page

2016-06-29 Thread Christophe Dutang
Dear list, How can I link a vignette of a package in a man page (Rd files)? I try \link[=pkgname/doc/filename]{a name} without success. The link gives the following error message: Only help files, NEWS, DESCRIPTION and files under doc/ and demo/ in a package can be viewed Thanks in advance K

Re: [R] t-test for regression estimate

2016-06-29 Thread Fox, John
Dear Steven, > -Original Message- > From: Steven Yen [mailto:sye...@gmail.com] > Sent: June 29, 2016 9:39 AM > To: Fox, John > Cc: R-help ; Sandy Weisberg (sa...@umn.edu) > > Subject: Re: [R] t-test for regression estimate > > Thanks John. Yes, by using verbose=T, I get the value of the

Re: [R] Understanding and predict round-off errors sign on simple functions

2016-06-29 Thread Marc Schwartz
Hi, Just to augment Bert's comments, I presume that you are aware of the relevant R FAQ: https://cran.r-project.org/doc/FAQ/R-FAQ.html#Why-doesn_0027t-R-think-these-numbers-are-equal_003f That you had an expectation of the difference being 0 suggested to me that you might not be, but my apo

Re: [R] t-test for regression estimate

2016-06-29 Thread Steven Yen
Also, Is there a way to get the second command (hypothesis defined with externally scalars) below to work? Thanks. linearHypothesis(U,"0.5*eq1_DQ+0.3*eq2_DQ",verbose=T) w1<-0.5; w2<-0.3 linearHypothesis(U,"w1*eq1_DQ+w2*eq2_DQ",verbose=T) # does not work On 6/29/2016 12:38 PM, Steven Yen wrote: >

Re: [R] t-test for regression estimate

2016-06-29 Thread Steven Yen
Thanks John. Yes, by using verbose=T, I get the value of the hypothesis. But tell me again, how would I get the variance (standard error)? On 6/29/2016 11:56 AM, Fox, John wrote: > Dear Steven, > > OK -- that makes sense, and there was also a previous request for > linearHypothesis() to return t

Re: [R] t-test for regression estimate

2016-06-29 Thread Fox, John
Dear Steven, OK -- that makes sense, and there was also a previous request for linearHypothesis() to return the value of the hypothesis and its covariance matrix. In your case, where there's only 1 numerator df, that would be the value and estimated sampling variance of the hypothesis. I've no

Re: [R] Antwort: Re: Antwort: Re: Installing from source on Windows 7: tibble [SOLVED]

2016-06-29 Thread Duncan Murdoch
On 29/06/2016 10:48 AM, g.maub...@weinwolf.de wrote: Hi Duncan, indeed, I did not see the other part of your message. I did BINPREF ?= C:/R-Project/Rtools/mingw_32/bin/ COMPILED_BY = g++ # instead of gcc-4.9.3 I wouldn't change the COMPILED_BY; some packages use it to configure themselves f

Re: [R] Understanding and predict round-off errors sign on simple functions

2016-06-29 Thread Bert Gunter
I am certainly no expert, but I would assume that: 1. Roundoff errors depend on the exact numerical libraries and versions that are used, and so general language comparisons are impossible without that information; 2. Roundoff errors depend on the exact calculations being done and machine precisi

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

2016-06-29 Thread Bert Gunter
Did you mean: strip.custom(factor.levels...) ? (I know of no "panel.custom()" function) -- 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 Wed, Jun 29,

[R] Antwort: Re: Antwort: Re: Installing from source on Windows 7: tibble [SOLVED]

2016-06-29 Thread G . Maubach
Hi Duncan, indeed, I did not see the other part of your message. I did BINPREF ?= C:/R-Project/Rtools/mingw_32/bin/ COMPILED_BY = g++ # instead of gcc-4.9.3 in "C:\R-Project\R-3.3.0\etc\i386\Makeconf" and BINPREF ?= C:/R-Project/Rtools/mingw_64/bin/ COMPILED_BY = g++ # instead of gcc-4.9.3 i

[R] Antwort: Re: Installing from source on Windows 7: tibble

2016-06-29 Thread G . Maubach
Hi Duncan, many thanks for your reply. I did insert die paths to the g++ compiler because I got the message about the not existent compiler. I took the directories for the compiler out again: C:\R-Project\Rtools\bin;C:\ProgramData\Oracle\Java\javapath;C:\Program Files\Python 3.5\Scripts\;C:\P

Re: [R] [FORGED] Splitting data.frame into a list of small data.frames given indices

2016-06-29 Thread Ivan Calandra
Your answer did not make it to the list... Le 29/06/2016 à 16:06, Witold E Wolski a écrit : If you do not understand than why do you reply? On 29 June 2016 at 15:54, Ivan Calandra wrote: Hi, I don't really understand why you split every row... This makes it very slow. Try with a more realis

Re: [R] Antwort: Re: Installing from source on Windows 7: tibble

2016-06-29 Thread Duncan Murdoch
On 29/06/2016 10:17 AM, g.maub...@weinwolf.de wrote: Hi Duncan, many thanks for your reply. I did insert die paths to the g++ compiler because I got the message about the not existent compiler. I took the directories for the compiler out again: C:\R-Project\Rtools\bin;C:\ProgramData\Oracle\Ja

Re: [R] [FORGED] Splitting data.frame into a list of small data.frames given indices

2016-06-29 Thread William Dunlap via R-help
I won't go into why splitting data.frames (or factors) uses time proportional to the number of input rows times the number of levels in the splitting factor, but you will get much better mileage if you call split individually on each 'atomic' (numeric, character, ...) variable and use mapply on the

Re: [R] a new df with one combined column

2016-06-29 Thread David L Carlson
It looks like License was imported as character data and converted to a factor. I'm not sure I understand what you want, but to make them into a single column, you need to convert the factor back to numeric using as.numeric(as.character(License)), but you use the command levels(License) to look

Re: [R] a new df with one combined column

2016-06-29 Thread Ulrik Stervbo
Then I don't understand what you want to achieve. If you want to combine the two columns you can do c(df1$col1, df2$col2) Ulrik schrieb am Mi., 29. Juni 2016 15:45: > Hi Ulrik, > Thnaks for your reply, merge() does not give me one column, it returns two > columns > > > On Wednesday, June 29,

Re: [R] [FORGED] Splitting data.frame into a list of small data.frames given indices

2016-06-29 Thread Ivan Calandra
Hi, I don't really understand why you split every row... This makes it very slow. Try with a more realistic example (with a factor to split). Ivan -- Ivan Calandra, PhD Scientific Mediator University of Reims Champagne-Ardenne GEGENAA - EA 3795 CREA - 2 esplanade Roland Garros 51100 Reims, Fr

Re: [R] a new df with one combined column

2016-06-29 Thread Ulrik Stervbo
It looks like the function you are searching for is merge() HTH Ulrik On Wed, 29 Jun 2016 at 15:11 ch.elahe via R-help wrote: > Hi all, > I have this column as a part of df: > > $License : Factor W/384 levels > "41005","41006","41034","41097","41200",... > and I have other column which is

Re: [R] [FORGED] Splitting data.frame into a list of small data.frames given indices

2016-06-29 Thread Witold E Wolski
Hi, Here is an complete example which shows the the complexity of split or by is O(n^2) nrows <- c(1e3,5e3, 1e4 ,5e4, 1e5 ,2e5) res<-list() for(i in nrows){ dum <- data.frame(x = runif(i,1,1000), y=runif(i,1,1000)) res[[length(res)+1]]<-(system.time(x<- split(dum, 1:nrow(dum } res <- do.

[R] a new df with one combined column

2016-06-29 Thread ch.elahe via R-help
Hi all, I have this column as a part of df: $License : Factor W/384 levels "41005","41006","41034","41097","41200",... and I have other column which is a part of other df lets say df2: $Diff: int 41166 41202 41290 41353 41503 41507 41548 these two columns df$License and df$Diff

Re: [R] Rpart plot produces no text

2016-06-29 Thread Achim Zeileis
I don't think this is an RStudio issue. The plot() method for "rpart" objects draws no labels. The text() method has to be called additionally: library("rpart") rp <- rpart(Species ~ ., data = iris) plot(rp) text(rp) As these plots produced by rpart itself are not very appealing, there are var

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

2016-06-29 Thread Duncan Mackay
Patrick Have a look at https://stat.ethz.ch/pipermail/r-help/2006-August/110621.html and https://stat.ethz.ch/pipermail/r-help/2008-June/165279.html I remember working it out with an example but I cannot remember any of the details Regards Duncan -Original Message- From: R-help [mail

Re: [R] Rpart plot produces no text

2016-06-29 Thread John Kane
What happens if you run the code in a terminal rather than RStudio? My experience is that very, very occasionally RStudio does something a bit funny with plots. And while this may sound funny just shut down RStudio, reload it and try again. John Kane Kingston ON Canada > -Original Mess

Re: [R] Installing from source on Windows 7: tibble

2016-06-29 Thread Duncan Murdoch
On 29/06/2016 5:49 AM, g.maub...@weinwolf.de wrote: Hi All, I would like to install R packages from source on Windows 7 64-Bit. Currently my settings are: -- cut -- sessionInfo() R version 3.3.0 (2016-05-03) Platform: x86_64-w64-mingw32/x64 (64-bit) Running under: Windows 7 x64 (build 7601) S

[R] Understanding and predict round-off errors sign on simple functions

2016-06-29 Thread Sirhc via R-help
Hi, May be it is a basic thing but I would like to know if we can anticipate round-off errors sign. Here is an example : # numerical matrix m <- matrix(data=cbind(rnorm(10, 0), rnorm(10, 2), rnorm(10, 5)), nrow=10, ncol=3) > m [,1] [,2] [,3] [1,] 0.4816247 1

Re: [R] [FORGED] Splitting data.frame into a list of small data.frames given indices

2016-06-29 Thread Rolf Turner
On 29/06/16 21:16, Witold E Wolski wrote: It's the inverse problem to merging a list of data.frames into a large data.frame just discussed in the "performance of do.call("rbind")" thread I would like to split a data.frame into a list of data.frames according to first column. This SEEMS to be eas

[R] Installing from source on Windows 7: tibble

2016-06-29 Thread G . Maubach
Hi All, I would like to install R packages from source on Windows 7 64-Bit. Currently my settings are: -- cut -- > sessionInfo() R version 3.3.0 (2016-05-03) Platform: x86_64-w64-mingw32/x64 (64-bit) Running under: Windows 7 x64 (build 7601) Service Pack 1 locale: [1] LC_COLLATE=German_Germany.

[R] Splitting data.frame into a list of small data.frames given indices

2016-06-29 Thread Witold E Wolski
It's the inverse problem to merging a list of data.frames into a large data.frame just discussed in the "performance of do.call("rbind")" thread I would like to split a data.frame into a list of data.frames according to first column. This SEEMS to be easily possible with the function base::by. How

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

2016-06-29 Thread Patrick Connolly
On Mon, 27-Jun-2016 at 10:17PM -0700, Bert Gunter wrote: [...] |> |> You seem to be making this way more difficult than you should. Though I didn't get any closer to an understanding of which.panel, the question I asked was simply answered by panel.custom(factor.levels = ) Thanks to Duncan Ma