Re: [R] year and week to date - before 1/1 and after 12/31

2018-10-18 Thread peter salzman
result <- weekEnds( tst ) > set.seed( 42 ) > result[ sample( nrow( result ), 5 ), ] > #> Y wn weekBeginweekEnd > #> 80 2021 53 2021-12-27 2022-01-03 > #> 81 2022 53 2022-12-26 2023-01-02 > #> 25 2024 0 2024-01-01 2024-01-08 > #> 70 2011 53 2011-12-26 2012-01-02 > #> 54

Re: [R] year and week to date - before 1/1 and after 12/31

2018-10-16 Thread peter salzman
2018 10:22:10 AM PDT, Jeff Newmiller < > jdnew...@dcn.davis.ca.us> wrote: > >If the date in your character representation does not exist then there > >is no requirement for a POSIX function to give any reliable answer... > >including NA. Using 00 as the week number won

Re: [R] year and week to date - before 1/1 and after 12/31

2018-10-16 Thread peter salzman
that is not NA one can do max( c(d1,d2), na.rm=TRUE ) maybe there is some other trick best, peter On Tue, Oct 16, 2018 at 10:22 AM peter salzman wrote: > hi, > > to turn year and week into the date one can do the following: > > as.Date('2018 05 Sun', "%Y %W

[R] year and week to date - before 1/1 and after 12/31

2018-10-16 Thread peter salzman
"2018 00 Sun" to 2018-12-31 and from "2017 53 Mon" to 2018-01-01 i realize i can loop over days of week and do some if/then statements, but is there a built in function? thank you peter -- Peter Salzman, PhD Department of Biostatistics and Computational Biology Univer

Re: [R] Linear regression with a rounded response variable

2015-10-21 Thread peter salzman
[[alternative HTML version deleted]] > > __ > R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide > http://www.R-project.org/posting-guide.ht

Re: [R] Reading chunks of data from a file more efficiently

2014-08-11 Thread peter salzman
; > Regards, > Scott Waichler > Pacific Northwest National Laboratory > Richland, WA, USA > scott.waich...@pnnl.gov > > __ > R-help@r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read t

Re: [R] Frequencies for a list of vectors

2014-08-05 Thread peter salzman
it needs a lappend function lappend <- function(lst, obj) { lst[[length(lst)+1]] <- obj return(lst) } On Tue, Aug 5, 2014 at 10:59 PM, peter salzman wrote: > hi, > > this may be overkill but i have a general function that tabulates lists of > anything. it works on

Re: [R] Frequencies for a list of vectors

2014-08-05 Thread peter salzman
; > [[alternative HTML version deleted]] > > __ > R-help@r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide > http://www.R-project.org/posting-guide.html > and provid

Re: [R] NA/NaN values in bnlearn package R

2014-06-10 Thread peter salzman
__ > R-help@r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/ > posting-guide.html > and provide commented, minimal, self-contained, reproducible code. > -- Peter Salzman, PhD D

Re: [R] testing coeficients of glm

2008-01-24 Thread peter salzman
thank you, peter On 1/24/08, Prof Brian Ripley <[EMAIL PROTECTED]> wrote: > > On Thu, 24 Jan 2008, peter salzman wrote: > > > Dear list, > > > > i'm trying to test if a linear combination of coefficients of glm is > equal > > to 0. For example : &

[R] testing coeficients of glm

2008-01-24 Thread peter salzman
p-value: p.val <- 2 * pnorm( -abs(muHb), mean=0, sd=sqrt(varHb),lower.tail = TRUE) thanks again, peter -- Peter Salzman, PhD Department of Biostatistics and Computational Biology University of Rochester [[alternative HTML version deleted]] __ R-hel

Re: [R] Disentagling formulas

2007-10-01 Thread peter salzman
ist > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide > http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. > -- Peter Salzman, PhD Department of Biostatistics and Computational Biology Unive