[R] Difference subsetting (dataset$variable vs. dataset["variable"]

2016-05-30 Thread G . Maubach
Hi All, I thought dataset$variable is the same as dataset["variable"]. I tried the following: > str(ZWW_Kunden$Branche) chr [1:49673] "231" "151" "151" "231" "231" "111" "231" "111" "231" "231" "151" "111" ... > str(ZWW_Kunden["Branche"]) 'data.frame':49673 obs. of 1 variable: $

Re: [R] graphic device Windows tickmarks

2016-05-30 Thread Duncan Mackay
Hi Without looking at the help guide I think there are restrictions on resolution and just in case of unit problems I worked in the default units > png("test.png",units="in",width=12,height=12,res=300) Error in png("test.png", units = "in", width = 12, height = 12, res = 300) : unable to star

Re: [R] Extract from a text file

2016-05-30 Thread Jeff Newmiller
Please learn to post in plain text (the setting is in your email client... somewhere), as HTML is "What We See Is Not What You Saw" on this mailing list. In conjunction with that, try reading some of the fine material mentioned in the Posting Guide about making reproducible examples like this

Re: [R] Extract from a text file

2016-05-30 Thread Ulrik Stervbo
Hi Val, Take a kook at read.table. If for some reason the file dosen't have the same separator between the columns you can use strsplit after loading the file. This might helpyou along getting data into R: http://www.statmethods.net/input/importingdata.html Best On Tue, 31 May 2016, 02:15 Val,

[R] Extract from a text file

2016-05-30 Thread Val
Hi all, I have a messy text file and from this text file I want extract some information here is the text file (out.txt). One record has tow lines. The mean comes in the first line and the SE of the mean is on the second line. Here is the sample of the data. Mean of weight group 1, SE of mean

Re: [R] email threads chronology

2016-05-30 Thread Jeff Newmiller
Mark, you can follow the bouncing emails by looking at the raw message headers. How you would access them depends on your email client, but "Received:" headers appear in reverse chronological order above the "From:" line, indicating the times when the email had reached various servers in its jo

Re: [R] Trimming time series to only include complete years

2016-05-30 Thread Jeff Newmiller
Sorry, I put too many bugs (opportunities for excellence!) in this on my first pass on this to leave it alone :-( isPartialWaterYear2 <- function( d ) { dtl <- as.POSIXlt( d ) wy1 <- cumsum( ( 9 == dtl$mon ) & ( 1 == dtl$mday ) ) # any 0 in wy1 corresponds to first partial water year res

Re: [R] How to replace all commas with semicolon in a string

2016-05-30 Thread Jim Lemon
Hi Jun, As you do seem to want to replace commas within, not between, strings, try gsub: gsub(",",";",test[,1]) Jim > Dear list, > > Say I have a data frame > > test <- data.frame(C1=c('a,b,c,d'),C2=c('g,h,f')) > > I want to replace the commas with semicolons > > sub(',',';',test$C1) -> test$C1

Re: [R] email threads chronology

2016-05-30 Thread Jim Lemon
Hi Mark, As with most other annoying, time-consuming operations in the internet and computing in general, blame the spammers and the scammers. The R help list is attacked by both and requires both automatic and human scanning of messages to minimize intrusions. Unfortunately no one has come up with

Re: [R] [FORGED] Re: email threads chronology

2016-05-30 Thread Rolf Turner
On 31/05/16 03:58, Bert Gunter wrote: On Mon, May 30, 2016 at 5:51 AM, Fowler, Mark wrote: ... "The preceding replies suggest this is something going on at my end, perhaps related to network security. I'm curious what might be causing it, and if there is something I can do about it - short of

Re: [R] sandwich package: HAC estimators

2016-05-30 Thread Leonardo Ferreira Fontenelle
Em Sáb 28 mai. 2016, às 15:50, Achim Zeileis escreveu: > On Sat, 28 May 2016, T.Riedle wrote: > > I thought it would be useful to incorporate the HAC consistent > > covariance matrix into the logistic regression directly and generate an > > output of coefficients and the corresponding standard er

[R] Regression and Sub-Groups Analysis in Metafor

2016-05-30 Thread Dan Kolubinski
I am completing a meta-analysis on the effect of CBT on low self-esteem and I could use some help regarding the regression feature in metafor. Based on the studies that I am using for the analysis, I identified 4 potential moderators that I want to explore: - Some of the studies that I am using us

Re: [R] matrix indexing/subset error

2016-05-30 Thread Jeff Newmiller
z %% 2 == 1 has 12 logical values. What do you expect R to do with it worth respect to 4 rows? -- Sent from my phone. Please excuse my brevity. On May 30, 2016 11:38:46 AM PDT, Carl Sutton via R-help wrote: >Hi Guru's >In my quest to understand R I have what I thought was a simple exercise

[R] graphic device Windows tickmarks

2016-05-30 Thread Christian Brandstätter
Dear List, I discovered an issue; when plotting (base) in R, the tickmark-labels are slightly off (Windows machine). Thus, when saving the plot in R with x11() and dev(...) the plot-tickmarks shift, see the example below. Session Info: R version 3.2.3 (2015-12-10) Platform: x86_64-w64-ming

[R] matrix indexing/subset error

2016-05-30 Thread Carl Sutton via R-help
Hi Guru's In my quest to understand R I have what I thought was a simple exercise that now has me baffled.  Why the error message after running this code?  I am totally baffled by the error message.  I was expecting rows 1 and 3 of the x matrix to be returned, and have not a clue as to why this

Re: [R] How to replace all commas with semicolon in a string

2016-05-30 Thread Leonardo Ferreira Fontenelle
Em Sex 27 mai. 2016, às 12:10, Jun Shen escreveu: > Dear list, > > Say I have a data frame > > test <- data.frame(C1=c('a,b,c,d'),C2=c('g,h,f')) > > I want to replace the commas with semicolons > > sub(',',';',test$C1) -> test$C1 will only replace the first comma of a > string. > > How do I re

Re: [R] email threads chronology

2016-05-30 Thread Bert Gunter
Inline: 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 Mon, May 30, 2016 at 5:51 AM, Fowler, Mark wrote: ... "The preceding replies suggest this is something

[R] email threads chronology

2016-05-30 Thread Fowler, Mark
Hi all, I'm seeing the natural sequencing of email threads getting corrupted. For example, a May 26 thread on subject 'Shaded areas in R' would have been initiated by an email at 6:58am. However I did not get that email until 1:48pm, preceded by 3 replies to the post. Trivial but irritating. Th

Re: [R] model specification using lme

2016-05-30 Thread Thierry Onkelinx
Dear Hanna, None of the models are correct is you want the same random intercept for the different methods but different random slope per method. You can random = ~ 1 + time:method | individual The easiest way to get alpha_0 and tau_i is to apply post-hoc contrasts. That is fairly easy to do wit

Re: [R] colored table

2016-05-30 Thread Tal Galili
Hell Naresh, If to add to what others already wrote, there is also the new {heatmaply } package, which enable you to create *interactive* heatmaps. For examples, you can view the vignette here: https://cran.r-project.org/web/packages/heatmaply/vi