Re: [R] Something simple not working in group_by

2018-07-10 Thread Sumitrajit Dhar
1 612 > 3 2 6 6 > 4 2 3 9 > 5 3 3 3 > 6 3 3 6 > > Cheers, > Bert > > > > > Bert Gunter > > "The trouble with having an open mind is that people keep coming along and > sticking things into it." > -- Op

[R] Something simple not working in group_by

2018-07-09 Thread Sumitrajit Dhar
Hi Folks, I am trying to get a group_by cumsum using: R version 3.5.0 (2018-04-23) -- "Joy in Playing" Copyright (C) 2018 The R Foundation for Statistical Computing Platform: x86_64-apple-darwin15.6.0 (64-bit) Here is an example of a simple construct that is not working. m <- data.frame( id = r

[R] Running segmented on grouped data and collating model parameters in a data frame

2018-06-03 Thread Sumitrajit Dhar
Hi Folks, I am trying to teach myself how to solve the problem described below but am running out of time. Hence the plea for help. Thanks in advance. Here is my data frame. > t # A tibble: 12 x 12 subject ageGrp ear hearingGrp sexfreqL2 Ldp PhidpNF SNR Ldp_p

[R] Filtering using multiple rows in dplyr

2018-05-30 Thread Sumitrajit Dhar
Hi Folks, I have just started using dplyr and could use some help getting unstuck. It could well be that dplyr is not the package to be using, but let me just pose the question and seek your advice. Here is my basic data frame. head(h) subject ageGrp ear hearingGrp sex freq L2 Ldp

[R] Piecewise regression using segmented package plotted in xyplot

2015-08-27 Thread Sumitrajit Dhar
Hi, xyplot(threshold ~ age |frequency.a, data=rage, groups=HL, cex=0.5, layout=c(7,4), par.strip.tex=list(cex=0.8), xlab="Age (years)", ylab="Threshold (dB SPL)", na.rm="TRUE", panel=function(x,y,groups,...) { panel.superpose(x,y,groups=HL,...) # panel.abline(segmented(lm(threshold~age

[R] Assembling output of table()

2015-04-07 Thread Sumitrajit Dhar
Hi folks, I am struggling with something that should be simple. Here is my data frame: head(jData[,1:8]) x study_id qx_1_v4j qx_1a_v4j qx_1b_v4j qx_2_v4j qx_2a_v4j qx_3_v4j 1 1 MCJ10011 1 11 11 2 2 MCJ10021 1 21

[R] Strange error on text assignment to variable

2014-01-21 Thread Sumitrajit Dhar
Hello folks, I am using R version 3.0.2 (2013-09-25) -- "Frisbee Sailing" Copyright (C) 2013 The R Foundation for Statistical Computing Platform: x86_64-apple-darwin10.8.0 (64-bit) on Mac OS 10.9.1 When I try a simple assignment as below, the first "For" works but the second "for" gives me a

[R] help: unbalanced repeated measures

2008-11-29 Thread Sumitrajit Dhar
Hi folks, I am trying to figure out how run a repeated measures ANOVA on the following data set. subject trial frequency dplvl 1 FSI052A A 1NA 2 FSI052B B 1NA 3 FSI053A A 1NA 4 FSI055A A 1NA 5 FSI055B B 1NA