Re: [R] Identifying peak periods of observations in circular yearly data

2015-05-27 Thread Daisy Englert Duursma
tly writing in > an entirely different context, it shouldn't really make much > difference. > > Jim > > > On Wed, May 27, 2015 at 4:35 PM, Daisy Englert Duursma > wrote: > > Greetings, > > > > I am trying to identify at which point during the year

[R] Identifying peak periods of observations in circular yearly data

2015-05-27 Thread Daisy Englert Duursma
lot(density(obsDay)) -- Daisy Englert Duursma Department of Biological Sciences Room W19F 135 Macquarie University, North Ryde, NSW 2109 Australia Tel +61 2 9850 1302 [[alternative HTML version deleted]] __ R-help@r-project.org mailing l

Re: [R] double if else

2015-02-22 Thread Daisy Englert Duursma
next } else { pres100km[[ii]]<-cells[ii] #100kmcells >= 30% coverage of 10kmcells } } else { if(nrow(subdat) < 5) { next } else { pres100km[[ii]]<-cells[ii] #more than 5 obs } } } On Mon, Feb 23, 2015 at 1:54 PM, Daisy Englert Duursma

[R] double if else

2015-02-22 Thread Daisy Englert Duursma
} else { pres100km[[ii]]<-cells[ii] #100kmcells >= 50% coverage of 10kmcells } } } -- Daisy Englert Duursma Department of Biological Sciences Room W19F 135 Macquarie University, North Ryde, NSW 2109 Australia Tel +61 2 9850 1302

[R] downloading web content

2013-07-23 Thread Daisy Englert Duursma
;;) Error in curlPerform(curl = curl, .opts = opts, .encoding = .encoding) : embedded nul in string: and a<-httpPOST(" http://biocache.ala.org.au/ws/occurrences/download?q=Banksia+ericifolia";) Error: Internal Server Error Any help would be appreciated. Daisy -- Daisy Englert Duursm

[R] interfacing with website

2013-07-16 Thread Daisy Englert Duursma
Hello, I have a question about interfacing with the Atlas of Living Australia website: http://biocache.ala.org.au/#tab_simpleSearch The following code works and I am able to download species observations. The problem I am having is that I would like additional fields of data. If I manually downlo

Re: [R] point.in.polygon help

2013-05-23 Thread Daisy Englert Duursma
//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. -- Daisy Englert Duursma Department of Biological Sciences R

Re: [R] Transform Coordinate System of an ASCII-Grid

2013-05-23 Thread Daisy Englert Duursma
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. -- Daisy Englert Duursma Department of Bio

[R] long format with reshape

2013-01-24 Thread Daisy Englert Duursma
n(x2) }) do.call(rbind, dat2) Cheers, Daisy -- Daisy Englert Duursma Department of Biological Sciences Room E8C156 Macquarie University, North Ryde, NSW 2109 Australia __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-he

Re: [R] Calculating percentages across multiple columns

2012-08-08 Thread Daisy Englert Duursma
Your question is very unclear.Can you provide a better question or at least a column of outputs you expect and an example with the dataframe you provided? On Thu, Aug 9, 2012 at 8:29 AM, Abraham Mathew wrote: > I have the following data and am trying to find the percentage of bid > values purchas

Re: [R] conditional statement to replace values in dataframe with NA

2012-06-06 Thread Daisy Englert Duursma
Thanks, problem solved. On Thu, Jun 7, 2012 at 1:58 PM, Daisy Englert Duursma wrote: > Hello and thanks for helping. > > #some data > L3 <- LETTERS[1:3] > dat1 <- data.frame(cbind(x=1, y=rep(1:3,2), fac=sample(L3, 6, replace=TRUE))) > > > #When x==1 and y==1 I wan

[R] conditional statement to replace values in dataframe with NA

2012-06-06 Thread Daisy Englert Duursma
not need to subset perhaps using lapply? Thanks, Daisy -- Daisy Englert Duursma Department of Biological Sciences Room E8C156 Macquarie University, North Ryde, NSW 2109 Australia Tel +61 2 9850 9256 __ R-help@r-project.org mailing list https://s

[R] random sample from list

2012-04-04 Thread Daisy Englert Duursma
of the list bg<- z_nonna[sample(1:length(z_nonna), 5000, replace=FALSE)] Thanks for the help, Daisy -- Daisy Englert Duursma Department of Biological Sciences Room E8C156 Macquarie University, North Ryde, NSW 2109 Australia Tel +61 2 9850 9256 [[alternative HTML version del

Re: [R] Legend for 2 plots on same screen

2011-07-31 Thread Daisy Englert Duursma
ernative 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 provide commented, minimal, s

Re: [R] Indexing to Insert values from a dataframe into a matrix

2011-06-28 Thread Daisy Englert Duursma
Thanks, that worked like a charm. Daisy On Wed, Jun 29, 2011 at 11:47 AM, David Winsemius wrote: > > On Jun 28, 2011, at 9:18 PM, Daisy Englert Duursma wrote: > >> Hello, >> >> I think this is a simple problem but I am not coming up with a simple >> solution. I

[R] Indexing to insert values from a dataframe into a matrix

2011-06-28 Thread Daisy Englert Duursma
and values to be replaced in the matrix dfr <- data.frame(cbind(x=seq(120,125,by=0.05), y=-25, var.1=1)) #insert the values from the dfr into the matrix bb[dfr$x,dfr$y]<-d$var.1 Thanks for your help, Daisy -- Daisy Englert Duursma Department of Biological Sciences Room E8C156 Macquarie U

[R] Indexing to Insert values from a dataframe into a matrix

2011-06-28 Thread Daisy Englert Duursma
Hello, I think this is a simple problem but I am not coming up with a simple solution. I think it just an indexing problem. I can easily replace values in a matrix from a dataframe when the dataframe has row and column numbers. In the example below I use row and column names and I can not get it

Re: [R] Deleting the last value of a vector

2011-04-17 Thread Daisy Englert Duursma
e posting guide http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. > -- Daisy Englert Duursma Department of Biological Sciences Room E8C156 Macquarie University, North Ryde, NSW 210 Australia Tel +61 2 9850 9256

Re: [R] multiple imputation manually

2011-02-08 Thread Daisy Englert Duursma
manually-tp3263786p3263786.html > Sent from the R help mailing list archive at Nabble.com. > > ______________ > 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.o

Re: [R] identifying when one element of a row has a positive number

2011-01-28 Thread Daisy Englert Duursma
0)), NA) >> g <- function(x) ifelse(sum(x > 0) == 2L, names(which(x == 0L)), NA) >>> apply(df1[, 3:5], 1, f) >>  [1] "ANN" "CTA" "GLM" NA    "ANN" NA    NA    NA    NA    "CTA" >>> apply(df1[, 3:5], 1, g) >>  [1] N

[R] identifying when one element of a row has a positive number

2011-01-26 Thread Daisy Englert Duursma
quot;NA","NA","NA","CTA") one_absence<-c("NA","NA","NA","NA","NA","NA","GLM","CTA","NA","NA") The end result should look like df2<-(cbind(df1,one_presence,

Re: [R] discerning plot dots using colors

2010-10-26 Thread Daisy Englert Duursma
; > > __ > 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. >

Re: [R] divide column in a dataframe based on a character

2010-10-25 Thread Daisy Englert Duursma
Thanks for the help. Easy as.. On Tue, Oct 26, 2010 at 3:33 PM, David Winsemius wrote: > > On Oct 25, 2010, at 8:56 PM, Daisy Englert Duursma wrote: > >> Hello, >> >> If I have a dataframe: >> >> example(data.frame) >> >> zz<-c("aa

[R] divide column in a dataframe based on a character

2010-10-25 Thread Daisy Englert Duursma
he column named group by the "_", how would I do this? so instead of the first row being x y fac char group 1 1 Ca aa_bb it should be: x y fac char group_agroup_b 1 1 Ca aa bb I know for a vector I can: x1 <- c("a_b","

[R] Unix batch to different nodes

2010-09-29 Thread Daisy Englert Duursma
),"w") cat(paste(group.vars[gv]),file=zzz) cat(paste(species[sp]),file=zzz) close(zzz) } } I know it is a silly script test but the division is similar to my real task which is repeated 459 times and each run takes 18 hours At this point I am confused what should be

Re: [R] xyplot axis line width

2010-09-13 Thread Daisy Englert Duursma
check out ?par for all the details on plotting ‘mgp’ The margin line (in ‘mex’ units) for the axis title, axis labels and axis line. Note that ‘mgp[1]’ affects ‘title’ whereas ‘mgp[2:3]’ affect ‘axis’. The default is ‘c(3, 1, 0)’. On Tue, Sep 14, 2010 at 8:56 AM,

[R] colorRamp of image to span larger range than dataset

2010-09-05 Thread Daisy Englert Duursma
Hello and thanks in advance, Using the dataset volcano: ascols = colorRampPalette(c("gray","yellow","darkgoldenrod1","orange","red"),interpolate="spline") x <- 10*(1:nrow(volcano)) y <- 10*(1:ncol(volcano)) image(x, y, volcano, col = ascols, axes = FALSE) In the example above, how would I change

Re: [R] degree C symbol in a function

2010-08-24 Thread Daisy Englert Duursma
Thanks for the advice, problem solved. -daisy On Wed, Aug 25, 2010 at 1:35 PM, David Winsemius wrote: > > On Aug 24, 2010, at 10:45 PM, Daisy Englert Duursma wrote: > >> Hello help, >> >> I have changed around some graphing code and made it into a function. >&g

[R] degree C symbol in a function

2010-08-24 Thread Daisy Englert Duursma
so: text(1,1,paste(b_unit),cex=1) and b_unit<-expression(~degree~C) This now inserts ~degree~C instead of the symbol. Any advice? Thanks, Daisy -- Daisy Englert Duursma Room E8C156 Dept. Biological Sciences Macquarie University  NSW  2109 Austra

[R] degree C

2010-08-24 Thread Daisy Englert Duursma
-- Daisy Englert Duursma Room E8C156 Dept. Biological Sciences Macquarie University  NSW  2109 Australia Tel +61 2 9850 9256 10A Carrington Rd Hornsby, NSW 2077 Mobile: 0421858456 __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman

Re: [R] barchart but with boxes

2010-06-07 Thread Daisy Englert Duursma
Thanks to all, I did eventually come up with a solution which involved sub-setting the data first into categories, making an empty plot, and then plotting rectangles. I really like the ggplot2 and I will use that next time. My ugly script is below Thanks, Daisy plot(1, xlim=c(5,45),ylim=c(0,1

[R] barchart but with boxes

2010-06-06 Thread Daisy Englert Duursma
d min and max. With that I could make the lines thick and achieve the effect I am looking for. Hopefully I have missed an obvious method to graph this. Thanks, Daisy -- Daisy Englert Duursma Room E8C156 Dept. Biological Sciences Macquarie University NSW 2109

Re: [R] excluding on element from a list

2010-05-24 Thread Daisy Englert Duursma
- > Think before you print - do you really need to print this email? > > > -------- > Scanned by MailMarshal - Mars

[R] excluding on element from a list

2010-05-24 Thread Daisy Englert Duursma
me and not the position. Any advice would be useful. Thanks, Daisy Daisy Englert Duursma Room E8C156 Dept. Biological Sciences Macquarie University NSW 2109 Australia __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-

[R] library location and error messages when loading packages

2010-05-23 Thread Daisy Englert Duursma
packages went, the updated package went to "C:\\RLIBRARY" . I have messed something up and I do not know how to fix it. Any advice would be welcome. Thanks, Daisy -- Daisy Englert Duursma Room E8C156 Dept. Biological Sciences Macquarie University NSW 2109 Australia _

Re: [R] x y plot with z coordinate scaling to a color value

2010-05-19 Thread Daisy Englert Duursma
Sorry, that should be qplot(x,y,data=yourdataset, colour= z) On Thu, May 20, 2010 at 3:07 PM, Daisy Englert Duursma wrote: > the package ggplot2 makes it really really easy! > > qplot(x,y,data=yourdataset, colour= color) > -- Daisy Englert Duursma Room E8C156 Dept. Biologi

Re: [R] x y plot with z coordinate scaling to a color value

2010-05-19 Thread Daisy Englert Duursma
the package ggplot2 makes it really really easy! qplot(x,y,data=yourdataset, colour= color) __ 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 an

Re: [R] issues with R Library on a Server

2010-05-18 Thread Daisy Englert Duursma
Hello, Thanks for your help so far, I am still having the same problem but I think I am getting closer. Just to recap, since setting up R on my server, so that everyone shares a common Library, I have had issues getting packages to load. Here is an example with the package survival. I have the sur

[R] issues with R Library on a Server

2010-05-17 Thread Daisy Englert Duursma
er correctly. Thanks, Daisy -- Daisy Englert Duursma Room E8C156 Dept. Biological Sciences Macquarie University NSW 2109 Australia Tel +61 2 9850 9256 10A Carrington Rd Hornsby, NSW 2077 Mobile: 0421858456 __ R-help@r-project.org mailing lis

Re: [R] selecting rows based on number that occurs after letter

2010-04-26 Thread Daisy Englert Duursma
(strsplit(as.character(x$GCM), ""), function(zzz)zzz[5] == > y),] } Basically this loops through and subsets the rows when the 5th character has the defined y value (1, 2,or 3). The problem is that y can occur anywhere in the GCM value. Thanks for the help. Daisy -- Daisy Eng

[R] selecting rows based on number that occurs after letter

2010-04-18 Thread Daisy Englert Duursma
ot;) for (y in year) { sdat2 <- sdat[sapply(strsplit(as.character(sdat$GCM), ""), function(zzz)zzz[5] == y),] Thanks Daisy Englert Duursma Bioclimatic Modeller Macquarie University Sydney, NSW, Australia __ R-help@r-project.org mailing lis