[R] A Harder Score Test Question

2009-07-25 Thread Sean
xph I can always program it myself. Thanks in advance. Sean Sean Brummel M.S. Doctoral Candidate Dept. Statistics University of California, Irvine Irvine, CA 92797-1250 Ph: 949-307-1811 Fax: 949-824-9863 [[alternative HTML version de

Re: [R] A Harder Score Test Question

2009-07-25 Thread Sean
) vcov(fit0)*sum(coxph.detail(fit0)$score)^2 ### Score Test From coxph fit1 <- coxph( Surv(time,cens)~grp ) fit1$score Thanks again, Sean -Original Message- From: Charles C. Berry [mailto:cbe...@tajo.ucsd.edu] Sent: Saturday, July 25, 2009 3:07 PM To: Sean Cc: r-help@r-project.

[R] How to get percent contribution of each factor of 1st component from Principal Component Regression (PCR)

2011-01-26 Thread Sean
one response. How can I get the contribution of each variable of 1st component? Are coef () or loadings() the right functions? But I don't know how to get the contribution from the values from these two functions. Thanks for your help. Sean -- View this message in context: http://r.7896

[R] Help with parsing a data file

2008-03-06 Thread sean
peats this format with (year, 13 lines of data for that year). I would ideally like to end up with an array/list/vector of the block of 13 values, indexed by year, each block using the column names given on the third line. If anyone has any good ideas on how to do this in R, pls. let me know. Th

[R] Question on interpreting glmer() results

2017-06-01 Thread Sean Trott
Hello, I originally posted this on the stats stack exchange site, but given its focus on R software, it was removed -- so I figured I'd post here. I'm having trouble interpreting a change in effect direction and significance when I add an interaction term to my glmer() model. *Part 1* I ran an

Re: [R] need help with excel data

2015-01-21 Thread Sean Porter
pe: =LEFT(A1,2) This will extract the first 2 characters from the left. To extract "45" you would type: =Right(A1,2) To get 2 characters starting at position 4 you would type: =MID(A1, 4,2) Which will give you 23. Hope this helps. Regards, DR. SEAN PORTER Scientist South African As

[R] monte carlo simulations in permanova in vegan package

2015-10-27 Thread Sean Porter
done in the commercial package PERMANOVA+ for PRIMER. How can I adapt my code so that adonis will do so ? Many thanks, Sean > permanova <- adonis(species ~ time, data = time, permutations=99, method="bray") > permanova Call: adonis(formula = species ~ time, data = time

Re: [R] monte carlo simulations in permanova in vegan package

2015-10-27 Thread Sean Porter
ion and aim? I was therefore hoping there was a way of coding for the Monte-Carlo permutation procedure into adonis? Thanks for your help! From: stephen sefick [mailto:ssef...@gmail.com] Sent: 27 October 2015 03:11 PM To: Sean Porter Cc: r-help@r-project.org Subject: Re: [R] monte carlo s

Re: [R] monte carlo simulations in permanova in vegan package

2015-10-30 Thread Sean Porter
.. Apologies if I am missing something and if what you have said still applies (that is not appropriate to exceed the possible number of permutations), I am not a statistician..so any help/clarity would be welcome.. Regards, sean   -Original Message- From: R-help [m

Re: [R] monte carlo simulations in permanova in vegan package

2015-10-30 Thread Sean Porter
.. Apologies if I am missing something and if what you have said still applies (that is not appropriate to exceed the possible number of permutations), I am not a statistician..so any help/clarity would be welcome.. Regards, sean   -Original Message- From: R-help [m

Re: [R] hourly prediction time series

2016-02-05 Thread Sean Porter
Try the auto.arima function in the forecast package.. Regards, DR SEAN PORTER Scientist South African Association for Marine Biological Research Direct Tel: +27 (31) 328 8169 Fax: +27 (31) 328 8188 E-mail: spor...@ori.org.za Web: www.saambr.org.za 1 King Shaka Avenue, Point, Durban 4001

[R] Saving plots to file

2009-08-10 Thread Sean MacEachern
p/hist1.png") Thanks in advance, Sean Session Info: R version 2.9.1 (2009-06-26) i386-apple-darwin8.11.1 locale: en_US.UTF-8/en_US.UTF-8/C/C/en_US.UTF-8/en_US.UTF-8 attached base packages: [1] stats graphics grDevices utils datasets methods base loaded via a namespace (and

Re: [R] Saving plots to file

2009-08-10 Thread Sean MacEachern
Thank you Cedric. That was a nice straight forward example that works great. Cheers, Sean On 8/10/09 11:45 AM, "Cedrick Johnson" wrote: > Try this: > > png(file="Desktop/hist1.png") > plot(glm1$residuals,gain,main = "Hist of residuals and gain"

[R] how to pass more than one argument to the function called by lapply?

2009-08-18 Thread Sean Zhang
side.fun.hardcode.cutoff <- function(indf, cutoff) { unlist(lapply(split(indf, indf[,'id']), function(.x, cutoff) {.x[,'y'] < 3} )) } outside.fun.hardcode.cutoff(indf,) #R code above So, can someone kindly show me how to pass more than one ar

[R] why need a new database to store results generated from another database in filehash?

2009-08-19 Thread Sean Zhang
7;id')) dbList(db1) #however, a new database(db2) can store "a_and_b" dbCreate("myDB2") db2<-dbInit("myDB2") dbInsert(db2,"a_and_b",merge(db1$a,db1$b,by='id')) dbList(db2) db2$a_and_b #R code above Is it possible to

[R] how to convert character string with only month and year into date

2009-09-22 Thread Sean Zhang
failed. #R code below. strptime(c("03_1993"),"%m_%Y") strptime(c("03-1993"),"%m-%Y") Can you someone kindly show me to do it? Many thanks in advance! -Sean [[alternative HTML version deleted]] __

Re: [R] how to convert character string with only month and year into date

2009-09-22 Thread Sean Zhang
David, Gabor, and Henriuqe, Thanks a lot for help! Another (inelegant) way is to use ts() and then supply the start and end time. this inelegant way works (I guess at least for equally spaced data.) . -Sean On Tue, Sep 22, 2009 at 3:19 PM, David Winsemius wrote: > > On Sep 22, 2009, a

[R] Multiple comparisons with a mixed effects model

2010-03-11 Thread Sean Henderson
ee if there are significant differences between them? Is it even possible to do this? I have tried doing it the same way I've done with linear models in the past, but instead of a t-value I get a z-value? Below is the code for what I have done. Thank you very much for any help! Sean &g

[R] Plot Fonts in Windows vs Mac OSX

2009-07-02 Thread Sean Carmody
r the perspicacity of my choice of search terms), so any help would be greatly appreciated! Regards, Sean. -- Sean Carmody The Stubborn Mule http://www.stubbornmule.net http://twitter.com/seancarmody __ R-help@r-project.org mailing list https://stat.et

Re: [R] Plot Fonts in Windows vs Mac OSX

2009-07-03 Thread Sean Carmody
abled? Also, I have tried the trick of using larger graphics reduced in the browser, but I have found that the results look a little blurry. I am yet to produce a png plot on Windows that looks anything like as good as the ones produced on the Mac. Regards, Sean. On Sat, Jul 4, 2009 at 1:35 AM, Wins

[R] Weibull Prediction?

2009-07-16 Thread Sean Brummel
response"))[1] ### Here is the mean and median of the data mean(y) median(y) ### Fitted Mean and Median from survreg fitScale<-exp(model$coef) fitShape<-1/model$scale fitScale*gamma(1 + 1/fitShape) fitScale*(log(2))^(1/fitShape) Is this done on purpose? If so does anyone know wh

Re: [R] Weibull Prediction?

2009-07-16 Thread Sean Brummel
Thanks for the help but... I did the required transformations at the end of the code. The thing that I dont understand is: Why is the predicted value (from the predict function) not either the mean or median. Sorry I was not clear in my explanation. Thanks, Sean On 7/16/09, David Winsemius

Re: [R] Weibull Prediction?

2009-07-16 Thread Sean Brummel
e since my example it is greater than one. Sean On 7/16/09, David Winsemius wrote: > > > On Jul 16, 2009, at 8:19 PM, Sean Brummel wrote: > > Thanks for the help but... > > I did the required transformations at the end of the code. The thing that > I dont understand is: Wh

[R] how to use do.call together with cbind and get inside a function

2009-07-26 Thread Sean Zhang
n my task, I have to run do.call("cbind",lapply(ColNameVec,get)) inside a function, can someone kindly help? Many thanks in advance! -Sean [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mai

[R] Draw plot.table axis on right hand side

2009-07-27 Thread Sean Carmody
"Mouse", "Frog")[data$x] data$b <- c("Banana", "Apple", "Pear", "Orange", "Melon")[data$y] plot(table(data$a, data$b), col=rainbow(5), las=1, main="") Regards, Sean. -- Sean Carmody The Stubborn Mule http://www.s

Re: [R] Draw plot.table axis on right hand side

2009-07-28 Thread Sean Carmody
;", "", "", "", "")[data$x] > > neither. > > So I would recommend to use package vcd instead, which has very detailed > detail handling. > > Dieter Thanks Dieter. I see vcd had a detailed vignette. That should help me get to grips wi

[R] read.socket and timeout

2010-04-12 Thread Sean Davis
a socket connection? Thanks, Sean __ 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

[R] How to right-align labels in dotchart

2009-10-15 Thread Sean Carmody
I have only just discovered the joys of the dotchart (since I am reading William Cleveland's -- Sean Carmody The Stubborn Mule http://www.stubbornmule.net http://twitter.com/seancarmody [[alternative HTML version deleted]] __ R-h

Re: [R] How to right-align labels in dotchart

2009-10-15 Thread Sean Carmody
Pressed send too soon (apologies). Meant to say I have only just discovered the joys of the dotchart (since I am reading William Cleveland's "The Elements of Graphing Data"). However, I cannot work out how to change the alignment of the text labels from left to right. Regards, Sea

Re: [R] How to right-align labels in dotchart

2009-10-16 Thread Sean Carmody
only I can nudge the labels a little further to the right... Regards, Sean. On Sat, Oct 17, 2009 at 5:05 AM, John Kane wrote: > Oops replying to the wrong post but anyway > does this do what you want? > > aa <- c(3,6,3,5,8) > lbs <- c('cat','goat', 'e

[R] help sub setting data frame

2009-10-22 Thread Sean MacEachern
df$PN) Warning message: In PN == df$PN : longer object length is not a multiple of shorter object length I wasn't aware that both the larger data frame had to be a multiple of the object you were sub-setting . In any case I would appreciate any insight into what I may be doing wrong. Cheers, Sean

Re: [R] help sub setting data frame

2009-10-22 Thread Sean MacEachern
=df[1:2] > dfc = df[dfb$id,] I get something along the lines of what I'd expect where my new dataframe is a subset of the original based on the matching ids I specified in dfb$id. Is that wrong in my first example? Cheers, Sean On Thu, Oct 22, 2009 at 4:55 PM, Ista Zahn wrote: > Hi Sean

Re: [R] help sub setting data frame

2009-10-22 Thread Sean MacEachern
Works perfectly! Thanks to all who responded. Sean On Thu, Oct 22, 2009 at 6:24 PM, Ista Zahn wrote: > Is this what you want? > > df = data.frame('id'=c(1:100),'res'=c(1001:1100)) > dfb=df[1:10,] > dfc = df[df$id %in% dfb$id,] > > Still not sure, but

[R] sample weight for box plot?

2009-10-29 Thread Sean Parks
Hi, I would like to make a box and whisker plot but use a sample weight for each observation. I've searched around a bit and have not found a method of doing this. Anyone have any advice? Thanks much, Sean Parks -- View this message in context: http://www.nabble.com/sample-weight-fo

[R] how to replace a single forward slash with a double backward slash in a string?

2009-12-13 Thread Sean Zhang
Dear R-helpers. Can someone kindly tell me how to replace a single forward slash with double backward slash in a string? i.e., from "a/b" to "a\\b" Many thanks in advance. -Sean [[alternative HTML version deleted]] __

[R] how to replace a single backward slash with a double backward slash?

2009-12-13 Thread Sean Zhang
t; into "c:\\test" I tried the following but does not work. gsub("\\\","","c:\test") Can someone help? Thanks a lot in advance. -Sean [[alternative HTML version deleted]] __ R-help@r-project.org ma

Re: [R] how to replace a single backward slash with a double backward slash?

2009-12-13 Thread Sean Zhang
Correct me, if I misunderstand and there is no such a limitation. Thanks again. -Sean On Sun, Dec 13, 2009 at 5:26 PM, David Winsemius wrote: > > On Dec 13, 2009, at 5:11 PM, Sean Zhang wrote: > > Dear R-helpers: >> >> Hours ago, I asked how to replace a single

[R] how to apply the dummy coding rule in a dataframe with complete factor levels to another dataframe with incomplete factor levels?

2009-06-19 Thread Sean Zhang
ata=dfA)) #matB_wanted is below (matB_wanted<-rbind(c(1,0,0,0,0),c(1,1,0,1,0),c(1,1,0,1,0)) ) colnames(matB_wanted)<-colnames(matA) matB_wanted Can someone kindly show me how to get matB_wanted? Many thanks in advance! -Sean [[alternative HTML version deleted]] __

[R] Problem with storing a sequence of lmer() model fit into a list

2009-06-22 Thread Sean Zhang
x27;)]]<-fit_1 fit.list[[paste('fit_',indepvec[12],sep='')]]<-fit_2 so why cannot I store lmer() model fit in a list? Would someone kindly explain to me what the R error message(last line of this email) really means? You

[R] Reading 4-byte float into R from binary file

2009-06-24 Thread Sean Davis
in C, but the format is pretty simple, so I wanted to do it using just R. I did see as.single, but it appears that is for passing things to C and not much more. Any suggestions appreciated. Thanks, Sean [[alternative HTML version deleted]] _

Re: [R] Reading 4-byte float into R from binary file

2009-06-24 Thread Sean Davis
On Wed, Jun 24, 2009 at 2:55 PM, Duncan Murdoch wrote: > On 6/24/2009 2:41 PM, Sean Davis wrote: > >> A simple question, I hope I have a binary file format that I want to >> slurp into R using readBin. There are a couple of fields in the file that >> are 4-byte

[R] How to handle tabular form data in lmer without expanding the data into binary outcome form?

2009-04-10 Thread Sean Zhang
at https://stat.ethz.ch/pipermail/r-help/2008-May/161072.html Seems to me, that link is implementing data expansion approach (they have only 1600 obs after data expansion). If someone knows a neat solution other than data expansion, please help. Many thanks in advance! -Sean [[alternati

[R] question related to fitting overdispersion count data using lmer quasipoisson

2009-04-11 Thread Sean Zhang
output of fit.lmer.over.quasi below). Can someone kindly explain to me what went wrong? Many thanks in advance. -Sean #data simulation (modified from code at http://markmail.org/message/j3zmgrklihe73p4p) set.seed(100) m <- 5 n <- 100 N <- n*m #X <- cbind(1,runif(N)) X <- cbin

[R] Sean / Re: question related to fitting overdispersion count data using lmer quasipoisson

2009-04-11 Thread Sean Zhang
Hey Buddy, Hope you have been doing well since last contact. If you have the answer to the following question, please let me know. If you have chance to travel up north. let me know. best, -Sean -- Forwarded message -- From: Sean Zhang Date: Sat, Apr 11, 2009 at 12:12 PM

[R] table() and setting useNA to be there by default?

2010-01-07 Thread Sean O'Riordain
NA='ifany') I could say something like.. > tab1 <- function(t, ...) { table(t, ..., useNA='ifany') } > tab1(t1) t 123 1234 but this names it as 't' instead of 't1' which is ugly? Any other suggestions please? Thanks in a

Re: [R] [BioC] Suppress output from getGEO

2010-01-29 Thread Sean Davis
nd to this? Hi, Craig. These dots are from the output from download.file(). GEOquery was modified to use "quiet=TRUE" on December 8, 2009. If you would like to take advantage of this change, you can use the development version of GEOquery. Sean _

[R] A==A false?

2013-03-07 Thread Creighton, Sean
> > as.numeric(ImpVol[1,5,57]) == 0.0001 [1] FALSE > > as.numeric(ImpVol[1,5,57]) [1] 1e-04 > > 0.0001 [1] 1e-04 > Any tips? Thanks Sean R 2.15.3 windows 7 __ R-help@r-project.org mailing list https://stat.ethz.ch/ma

[R] Question regarding error "x and y lengths differ"

2013-04-29 Thread Sean Doyle
Hello, I'm a first semester statistics studentand I am using R for roughly the third time ever. I am following a tutorial and yet I still get the error "x and y lengths differ." I am very new to

[R] R on a cluster head node and memory limits

2012-09-24 Thread Sean Davis
only R) on the head node (the only node with an outside internet connection)? The goal is to allow a small R instance to run on the head node to allow package installation, but nothing more complicated than that. Thanks, Sean __ R-help@r-project.org ma

[R] Nested ANCOVA question

2012-12-03 Thread Sean Bignami
hy does the Number of Groups at the bottom say 11? and say treatment %in% tank...that makes me think that I didn't nest it properly. Well...I think that is it...I'm confused. please help!! --Sean [[alternative HTML version deleted]]

[R] randomForest warning: The response has five or fewer unique values. Are you sure you want to do regression?

2014-03-20 Thread Sean Porter
ey get 500 trees from only 90 species even though they input 110 species in the response data. Why am I getting the warning/how do I solve it, and why is randomForest producing trees for only 3 species when I am looking at 100 species (response variables)? Many thanks Sean [[a

Re: [R] randomForest warning: The response has five or fewer unique values. Are you sure you want to do regression?

2014-03-25 Thread Sean Porter
each of only 3 species when I have 100 species in the matrix, surely this is not correct, what am I doing wrong? Also, what did you mean when you said by using the code I am not using randomForest directly ? Many thanks, Sean > # For Andy > # get biological data into R > biological <

[R] gradientForest input data structure

2014-04-02 Thread Sean Porter
7.1 0 0 0 ... $ ct: num 2.7 0 0 0 0 0 0 0 0 0 ... $ cu: num 0 0 30.9 0 41.2 ... [list output truncated] I thought it may be that some values are numbers and some are integers but I tested this using only numbers and found that this is not the problem. How do I get my response/species

[R] Cramer-von Mises test

2010-07-18 Thread Sean Carmody
rtest package). Any suggestions? Regards, Sean. -- Sean Carmody Twitter: http://twitter.com/seancarmody Stable: http://mulestable.net/sean The Stubborn Mule Blog: http://www.stubbornmule.net Forum: http://mulestable.net/ __ R-help@r-project.org mailing

Re: [R] Cramer-von Mises test

2010-07-18 Thread Sean Carmody
Thanks Peter...I hadn't some across the sos package before, but I'm sure I'll be putting it to good use from now on! Sean. On Mon, Jul 19, 2010 at 2:55 PM, Peter Ehlers wrote: > On 2010-07-18 22:04, Sean Carmody wrote: >> >> I have found the Kolmogorov-Smirnov

[R] Difficulty creating Julian day in data frame

2010-09-15 Thread Sean Parks
55.2084 1916-01-06 5843 As you can see, the "temp.date" column behaves as expected, but the "julian.day" column is populated with the Julian day value from 1/1/1916. Please help me out if you have some ideas. Thanks, Sean * Sean Parks Eco

[R] question about deparse(substitute(...))

2011-01-13 Thread Sean Zhang
? test.fun <- function(...){deparse(substitute(...))} test.fun(x) #this works test.fun(x,y,z) # I like c('x','y','z') be the output, but cannot get it. Thanks in advance. -Sean [[alternative HTML version deleted]] __

[R] how to cut a multidimensional array along a chosen dimension and store each piece into a list

2011-01-17 Thread Sean Zhang
o make it happen but I am searching for a better solution. Thanks in advance. -Sean [[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:/

Re: [R] removing duplicate rows

2010-05-11 Thread Sean Anderson
On Tue, May 11, 2010 at 9:07 PM, Jim Bouldin wrote: > > I'm trying to identify and remove rows in a data frame that are duplicated > only on particular columns within it (i.e. not on all columns). This is probably the cleanest way: dat <- data.frame(x = c(1, 2, 3), y = c(1, 1, 3)) subset(dat, !d

Re: [R] intersect

2010-05-11 Thread Sean Anderson
wrote: > how can I test every element in a vector whether appears in another vector? > such as > a<-c("aa", "bb", "ff", "cc") > b <-c("oo","jj","bb","cc") a %in% b [1] FALSE TRUE FALSE TRUE __ R-help@r-project.org mailing list https://stat.ethz.ch/ma

[R] frequencies of time series data

2010-05-13 Thread Adam Sean
I have an excel file in following shape: date Category 01/21/2010turf 01/21/2010jack 01/21/2010jack 01/22/2010 turf 01/22/2010 jack 01/22/2010 psi 01/22/2010 psi 01/22/2010 psi 01/23/2010 turf 01/23/2010 turf 01/23/2010 jack 01/23/2010 psi I need to outp

Re: [R] Histogram Bin

2010-05-14 Thread Sean Anderson
hist(dat, plot = FALSE) get.break.num <- function(x, breaks) { min((1:length(breaks))[x < breaks]) - 1 } # Then to use it: > get.break.num(6, hist.dat$breaks) [1] 1 > get.break.num(42, hist.dat$breaks) [1] 3 Sean __ R-help@r-project.org

[R] Vector recycling and zoo

2010-05-16 Thread Sean Carmody
4 6 3 6 9 4 8 12 5 10 15 > x$a/x$a[1] [1] 1 2 3 4 5 > x <- zoo(x) > x$a/x$a[1] 1 1 > I feel understanding this difference would lead me to a greater understanding of the zoo module! Sean. -- Sean Carmody Twitter: http://twitter.com/seancarmody Stable: http://mulestable.net/sean

Re: [R] Vector recycling and zoo

2010-05-16 Thread Sean Carmody
Thanks David, You comment made me realise that whereas when x is a data frame, x$a is a numeric vector, when x is of class zoo, x$a is also of class zoo, so the following does what I was expecting: x$a/as.numeric(x$a[1]) Sean. On Sun, May 16, 2010 at 9:25 PM, David Winsemius wrote: > >

Re: [R] [R-sig-DB] Package RPostgreSQL : Problem with dbWriteTable

2010-05-18 Thread Sean Davis
inserting rows > But If I send the "COPY FROM" as an sql query in R, the rows are then > well added > I think it is a problem with the temp file create by dbWriteTable > > As anyone solved this problem? > > Hi, Patrick. A reproducible example an

[R] Fwd: [R-sig-DB] Package RPostgreSQL : Problem with dbWriteTable

2010-05-18 Thread Sean Davis
-- Forwarded message -- From: PALMIER Patrick - CETE NP/INFRA/TRF < patrick.palm...@developpement-durable.gouv.fr> Date: Tue, May 18, 2010 at 8:05 AM Subject: Re: [R-sig-DB] Package RPostgreSQL : Problem with dbWriteTable To: "Davis, Sean (NIH/NCI) [E]" Hel

Re: [R] lines on plot

2010-05-20 Thread Sean Anderson
quot;)) > segments(0,2,2.3,2) > segments(0,3,2.3,3) > segments(0,4,2.3,4) > segments(0,5,2.3,5) > segments(0,6,2.3,6) > segments(0,7,2.3,7) abline(h = 2:7) grid() is another option also, axis(2, at = 2:7) is all you need Sean __ R-help@

Re: [R] persp(); help with 'tck' option

2010-05-26 Thread Sean Anderson
of axis length */ ... So, it looks like the tick length is hard coded as 3% of the axis length. I suppose you could edit that and re-compile R from source, but maybe there's an easier way? Perhaps I'm mistaken? Sean __ R-help@r-projec

Re: [R] [BioC] after updating biomaRt cannot connect any more

2010-05-31 Thread Sean Davis
tch ? > > Read this page. http://bioconductor.org/docs/install/ If you have problems after following the instructions, please follow the instructions in the posting guide and ask your question again. Also, note that the newest version of R is 2.11 and not 2.10.1 Patched. Sean [

Re: [R] writing a matrix in a file

2010-06-02 Thread Sean Anderson
... Matrix: [,1] [,2] [,3] [,4] [,5] [,6] [1,]55 -1 -1 -1 -1 [2,]882765 [3,]668275 x <- matrix(1:12, nrow = 4) sink("test.txt") cat("Matrix:\n") x sink() Also look at ?write.table Sean __

Re: [R] Borders on a polygon

2010-06-07 Thread Sean Anderson
On Mon, Jun 7, 2010 at 6:55 PM, beloitstudent wrote: > [...] I am trying to do some shading in R and am using the polygon() setting. > I want the border on the top and bottom of the polygon, but not on the left > and right. [...] One way would be to add the borders after as lines. For example: pl

[R] using character vector as input argument to setkey (data.table pakcage)

2011-02-06 Thread Sean Zhang
7;,'b') as an input argument as below setkey.wanted(test.dt,c('a','b')) Your help will be highly appreciated. -Sean [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch

[R] how to efficiently extract elements of a list?

2011-02-07 Thread Sean Zhang
3))) names(test.l)<-LETTERS[1:3] The following does not work. is there some command (I was thinking of do.call) that can do the job? test.l[[c('A','B')]] test.l[[c(1,3)]] do.call('[',c(test.l,c(1,3))) do.call('[[',c(test.l,c(1,3))) do.call('[',c

[R] spatial stats - geoR - variogram - standard deviation

2011-03-25 Thread Sean Parks
is the "standard deviation of the values in each bin". However, when I run this command, the standard deviation values are much larger than I would expect. I suspect my interpretation of the outputs from this command is wrong. I would appreciate your input. Please help. Than

[R] In need of help with correlations

2011-04-09 Thread Sean Farris
I am in need of someone's help in correlating gene expression. I'm somewhat new to R, and can't seem to find anyone local to help me with what I think is a simple problem. I need to obtain pearson and spearman correlation coefficients, and corresponding p-values for all of the genes in my dataset

[R] sapply( ) a loop function

2011-08-11 Thread Sean Bignami
g into the loop if you want to try it. fish<-rep(1,241) d2p<-seq((50/241),50,(50/241)) my.data.frame<-data.frame(fish,d2p) thanks!! Sean [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/lis

[R] Non-linear Regression best-fit line

2011-06-17 Thread Sean Bignami
func, data, mCall = as.list(match.call(func, : no 'getInitial' method found for "function" objects Can anyone help clarify how I can find the parameters for a best-fit curve for this data? Thanks!! Sean [[alternative HTML version deleted]] _

[R] Select Random Rows from a dataframe

2011-07-21 Thread Sean Bignami
Hi all, I have a dataframe of behavioral observations from 360 fish, each with 241 observation points(rows), which looks like this: > head(d) fishtreatment tank trial video tid pid ang.chgabs.ac t lenvel d2p x y 1 1

[R] applying a loop to multiple dataframes

2011-07-22 Thread Sean Bignami
"data.csv" dataframes that I don't want But I can't figure out how to write a "for" loop that will apply the (top) code above to each data frame. Also, once I'm able to apply the loop to each data frame, I would like to organize the data in a manageable form so I

[R] Vector size limit for table() in R-2.15.1

2012-08-09 Thread Sean Ruddy
dea how to troubleshoot. I have a work around that reads in chunks at a time, but I'm very interested in why there appears to be a limit at 2^29 when according to the unique.c file it should be twice that. Thanks for the help. -Sean [[alternative HTML version deleted]]

Re: [R] Vector size limit for table() in R-2.15.1

2012-08-09 Thread Sean ruddy
meone to do that. Much appreciated! Sean On Aug 9, 2012, at 10:05 PM, Prof Brian Ripley wrote: > As the posting guide asked you to before posting, try R-patched. That has > the NEWS items > >• duplicated(), unique() and similar now support vectors of > lengths abov

[R] getting R2 (goodness of fit) result after using biglm()

2011-11-14 Thread sean st.clair
help? Thanks, sean __ 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.

[R] Trouble converting hourly data into daily data

2011-12-14 Thread Sean Baumgarten
quot;aggregated" data frame only has two columns: Date and Diff_from_noon. I can't figure out how to get the columns with the actual weather variables to carry over from the original data frame. Any suggestions you have would be much appreciated. Thanks, Se

[R] how to draw random numbers from many categorical distributions quickly?

2011-12-14 Thread Sean Zhang
better approach for speed? Thanks in advance. -Sean [[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-gui

Re: [R] Trouble converting hourly data into daily data

2011-12-23 Thread Sean Baumgarten
Weather, FUN = which.min) n.obs <- cumsum(rle(as.double(Weather$Date))$lengths) n.obs <- c(0, n.obs[1:(length(n.obs) - 1)]) noon.ind <- agg$diff.time + n.obs subset <- Weather[noon.ind,] Cheers, Sean On Mon, Dec 19, 2011 at 6:03 AM, Jean V Adams wrote: > > Sean Baumgarten wr

[R] Guidance with PCA and Regression using complex categorical variables

2011-10-26 Thread sean st.clair
Hello. I need some guidance. I would like to run PCA and regression, and my predictor variables are mainly complex categorical variables (hundred's of levels for some of them). What packages and functions are useful for this? THanks. sean __ R

[R] Moore-Penrose Generalized determinant?

2012-03-14 Thread Sean O'Riordain
Is there a function in R to calculate the generalized determinant of a singular matrix? - similar to the ginv() used to compute the generalized inverse. I can't seem to find any R related posts at all. Thanks in advance, Sean O'Riordain Trinity College Dublin -- View this message

Re: [R] Moore-Penrose Generalized determinant?

2012-03-15 Thread Sean O'Riordain
My colleague asked me to thank those of you who responded. Kind regards, Sean -- View this message in context: http://r.789695.n4.nabble.com/Moore-Penrose-Generalized-determinant-tp4471629p4475415.html Sent from the R help mailing list archive at Nabble.com

[R] lmer - error message

2012-02-16 Thread Sean Godwin
has one binary observation. But I don't know what to do to be able to fit this model. Any help would be greatly appreciated! -Sean [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/li

[R] Dependency-aware scripting tools for R

2012-04-19 Thread Sean Davis
develop robust bioinformatic pipelines driven by scripts written in R. Thanks, Sean __ 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

[R] trouble with png image creation in R v2.14.0 on Red Hat 6

2012-05-22 Thread sean mcgee
Hello, Is anyone having trouble with png image generation with 2.14.0 on Red Hat 6? We recently updated our pipeline to Red Hat 6 (from 5) and R 2.14.0 (up from 2.9.0) and R shell scripts that worked fine before are now breaking in an unusual way. The source of the problem seems to be centered a

[R] Strptime

2008-05-30 Thread Creighton, Sean
ng. It can't, however, seem to go back the other way, i.e. as in the line below: > strptime(format(strptime("30-Jan-08", "%d-%b-%y") , "%d-%m-%Y"), "%d-%m-%Y") [1] "2008-01-30" Any tips? Thanks Sean > R.Version() $platform [1] "

[R] Histogram of gaps

2008-06-10 Thread Creighton, Sean
onsuming? Is there some function in a libray that already does something like this? Thanks Sean __ 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.htm

[R] gsub and "\"

2008-07-09 Thread Sean Davis
This is hopefully a simple question. I am trying to escape single quotes like so: abc's >> abc\'s However, I cannot find an easy way to do that with gsub: gsub("'","'","abc's") # returns &qu

Re: [R] gsub and "\"

2008-07-09 Thread Sean Davis
> [1] "abc\\'s" >> cat(gsub("'","'","abc's")) > abc\'s > > Which I think is what you were thinking it would be. So when you > write it out to a file, it will be correct. Thanks, Jim. That does it. Se

[R] Beginner help with retrieving frequency and transforming a matrix

2008-03-28 Thread Sean MacEachern
S-3 S-4 S-5 S-100 BR_F01 0.9167 0.5 1 0.6667 BR_F02 0.6667 0.2 1 0.5 ... ... ... BR_Z98 0.51 0.3 1 BR_Z9910.6 1 0.5 Thanks in advance for any help you can offer, and please let me know if there is any further information I can pr

[R] ROracle error at step 1

2008-04-23 Thread Creighton, Sean
h RODBC. Oracle client, version 9.2 installed, amongst others. Sean > library(DBI) > library(ROracle) > > packageDescription("ROracle") Package: ROracle Version: 0.5-7 Date: 2006-02-13 Title: Oracle database interface for R Author: David A. James <[EMAIL PROTECTED]>

Re: [R] ROracle error at step 1

2008-04-23 Thread Creighton, Sean
I want to do is kick off a stored procedure in an Oracle database, I think it might be easier to go through rJava. I don't want to quite give up just yet, on the elegant direct approach. Thanks in advance Sean -Original Message- From: Prof Brian Ripley [mailto:[EMAIL PROTECTED]

[R] Microseconds for a zoo object?

2008-05-08 Thread Creighton, Sean
Hello I have a string which contains microseconds, can anyone help on constructing this in to a time object, with the microseconds, that I can take to a ZOO file? Thanks Sean > UK[1,3] [1] "17:09:53.824" > UK[1,1] [1] "2007-12-11 00:00:00" > mydates <- pas

[R] Is it possible to do fancy area plots?

2008-05-08 Thread Sean Carmody
Does anyone have any ideas about how you could use R to produce a fancy area plot like this one in the NY Times? http://tinyurl.com/6rr22g Regards, Sean, [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https

  1   2   >