Re: [R] manipulating longitudinal data in r

2012-11-19 Thread Remko Duursma
You can use ave(), like this: ke$maxa - ave(ke$a, as.factor(ke$patid), FUN=max) greetings, remko -- View this message in context: http://r.789695.n4.nabble.com/manipulating-longitudinal-data-in-r-tp4649855p4650138.html Sent from the R help mailing list archive at Nabble.com.

[R] Read text into a nested list

2012-07-16 Thread Remko Duursma
Dear R-list, I am looking for a way to efficiently read a text file (see example below) into a nested list. I can probably find an ugly way to do this, but I would appreciate if anyone has (ideas for) efficient solutions. It seems to me this is a bit similar to parsing XML, could tools from the

Re: [R] deparse(substitute(x)) on an object with S3 class

2012-05-04 Thread Remko Duursma
Thanks for that - too bad there isn't a simple workaround! greetings Remko -- View this message in context: http://r.789695.n4.nabble.com/deparse-substitute-x-on-an-object-with-S3-class-tp4605592p4607815.html Sent from the R help mailing list archive at Nabble.com.

[R] deparse(substitute(x)) on an object with S3 class

2012-05-03 Thread Remko Duursma
(testlist) print.testclass(testlist2) Your object name is testlist2 thanks, Remko Duursma -- View this message in context: http://r.789695.n4.nabble.com/deparse-substitute-x-on-an-object-with-S3-class-tp4605592.html Sent from the R help mailing list archive at Nabble.com

[R] Align expression and text in mtext()

2011-12-08 Thread Remko Duursma
Dear R-helpers, I have trouble aligning an expression with a subscript, and text, in margin text: par(mar=c(6,6,1,1)) b - barplot(1:3) mtext(c(A,B,C), at=b, side=1, line=1, cex=1.3) mtext(expression(italic(C)[a]~(more~text)), at=0, line=1, side=1,cex=1.3) As explained in the help files and

Re: [R] Searching for the first two characters of a string

2011-11-20 Thread Remko Duursma
dfr - data.frame(txt= c(abab,ghghg,ththt,dfdfdf), yvar=1:4) ind - substr(dfr$txt,1,2) dfr[ind == ab,] greetings, Remko -- View this message in context: http://r.789695.n4.nabble.com/Searching-for-the-first-two-characters-of-a-string-tp4089862p4090042.html Sent from the R help mailing list

Re: [R] strsplit question

2011-10-12 Thread Remko Duursma
Hi Erin, this is one way: Block - c(5600-5699,6100-6199,9700-9799,9400-9499,8300-8399) splBlock - strsplit(Block,-) sapply(splBlock, [, 1) greetings, Remko -- View this message in context: http://r.789695.n4.nabble.com/strsplit-question-tp3896847p3896850.html Sent from the R help

[R] Sweave : some comments disappear

2011-09-06 Thread Remko Duursma
and keep.source=TRUE, but neither seem to affect this behavior. thanks, Remko - Remko Duursma Research Lecturer Hawkesbury Institute for the Environment University of Western Sydney Hawkesbury Campus, Richmond Mobile: +61 (0)422 096908

Re: [R] Sweave : some comments disappear

2011-09-06 Thread Remko Duursma
- Remko Duursma Research Lecturer Hawkesbury Institute for the Environment University of Western Sydney Hawkesbury Campus, Richmond Mobile: +61 (0)422 096908 www.remkoduursma.com On Tue, Sep 6, 2011 at 6:55 PM, Prof Brian Ripley rip...@stats.ox.ac.uk wrote: On Tue, 6 Sep

Re: [R] Sweave : allowing errors in R code?

2011-08-09 Thread Remko Duursma
Hi Remko, How about ?try Hope it helps, Tsjerk Not quite, because then the code chunk in the final doc. will have this try() around it as well - not too pretty for a user manual. remko On Aug 9, 2011 5:30 AM, Remko Duursma remkoduur...@gmail.com wrote: Dear R-helpers, sorry

Re: [R] Sweave : allowing errors in R code?

2011-08-09 Thread Remko Duursma
You can modify the behaviour upon errors by setting the error option. Check ?option and ?stop I looked at the 'error' settings in ?options, but I am not sure how that would be helpful, since I am trying to avoid Sweave from halting after an error occurs. I still want the error to be printed,

Re: [R] Sweave : allowing errors in R code?

2011-08-09 Thread Remko Duursma
, reproducible code. On 11-08-08 9:48 PM, Remko Duursma wrote: Dear R-helpers, sorry if this is obvious, but I can't find this in the documentation. I am using Sweave, and have some code that does not actually work - but I want to include it anyway, including the error message that R produces

Re: [R] Sweave : allowing errors in R code?

2011-08-09 Thread Remko Duursma
Works like a charm, thanks! remko -- View this message in context: http://r.789695.n4.nabble.com/Sweave-allowing-errors-in-R-code-tp3728790p3729802.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org mailing list

[R] Sweave : allowing errors in R code?

2011-08-08 Thread Remko Duursma
Dear R-helpers, sorry if this is obvious, but I can't find this in the documentation. I am using Sweave, and have some code that does not actually work - but I want to include it anyway, including the error message that R produces. But on running Sweave() on my .Rnw file, it simply halts when

[R] How to 'mute' a function (like confint())

2011-08-02 Thread Remko Duursma
Dear R-helpers, I am using confint() within a function, and I want to turn off the message it prints: x - rnorm(100) y - x^1.1+rnorm(100) nlsfit - nls(y ~ g0*x^g1, start=list(g0=1,g1=1)) confint(nlsfit) Waiting for profiling to be done... 2.5%97.5% g0 0.4484198 1.143761 g1

[R] gam confidence interval (package mgcv)

2011-06-27 Thread Remko Duursma
in the relationship: # Y(treatment ==B) / Y(treatment==A) as a function of X, with a confidence interval! Do I just do a bootstrap here? Or is there a more appropriate method? Thanks a lot for any help. greetings, Remko - Remko Duursma Research Lecturer

Re: [R] gam confidence interval (package mgcv)

2011-06-27 Thread Remko Duursma
, but I don't know how to get the CI for the ratio! thanks, remko - Remko Duursma Research Lecturer Hawkesbury Institute for the Environment University of Western Sydney Hawkesbury Campus, Richmond Mobile: +61 (0)422 096908 www.remkoduursma.com On Tue

Re: [R] complex search between dataframes

2011-06-02 Thread Remko Duursma
Here is another solution, using apply() and lapply(). # list of sequences corresponding to each row in data1: seqlist - apply(data1, 1, function(x)seq(from=x[1], to=x[2])) # Find which rows of data2 are inside those sequences: rowsInSeq- unlist(lapply(seqlist , function(x)which(data2$position

Re: [R] Exporting interactive 3D plots with axes and labels

2011-05-12 Thread Remko Duursma
Does ?snapshot3d not do what you want? Or what do you mean by 'export' ? remko - Remko Duursma Research Lecturer Hawkesbury Institute for the Environment University of Western Sydney Hawkesbury Campus, Richmond Mobile: +61 (0)422 096908

Re: [R] Change the text size of the title in a legend of a R plot.

2011-04-29 Thread Remko Duursma
( , ),title=Legend,cex=0.6, bty='n', title.adj=0.15) A bit of a hack but it works If you want the title larger, it will probably not fit the box, which you can omit by setting bty='n' (as in the second line). good luck, Remko - Remko Duursma

Re: [R] how to add frequencies to barplot

2010-11-20 Thread Remko Duursma
Hi Casper, try this: b - barplot(table(x2),density=4, ylim=c(0,100)) tx2 - table(x2) text(b,tx2+5, as.character(tx2)) greetings, Remko -- View this message in context: http://r.789695.n4.nabble.com/how-to-add-frequencies-to-barplot-tp3051923p3052067.html Sent from the R help mailing list

[R] rgl.snapshot() : no longer works?

2010-11-02 Thread Remko Duursma
Hi all, library(rgl) plot3d(1,1,1) snapshot3d(somefile.png) Error in rgl.snapshot(...) : pixmap save format not supported in this build Why does this no longer work? thanks, Remko sessionInfo() R version 2.12.0 (2010-10-15) Platform: i386-pc-mingw32/i386 (32-bit) locale: [1]

Re: [R] rgl.snapshot() : no longer works?

2010-11-02 Thread Remko Duursma
Ok, thanks. I just found the new (?) function rgl.postscript() , which works better for me anyway. Remko Duncan Murdoch-2 wrote: On 02/11/2010 8:24 PM, Remko Duursma wrote: Hi all, library(rgl) plot3d(1,1,1) snapshot3d(somefile.png) Error in rgl.snapshot(...) : pixmap save

Re: [R] how to make multiple curves in one plot

2010-11-01 Thread Remko Duursma
Dear Karena, Please read the posting guide : your example cannot be reproduced because we don't know in which package the 'running' function resides. Generally speaking, use 'points' or 'lines' to add points or lines to the current device. greetings, remko -- View this message in context:

Re: [R] One silly question about tapply output

2010-10-27 Thread Remko Duursma
Or, tap - tapply(rate, rating, mean) data.frame(Rating=as.factor(rownames(tap)), Mean=as.vector(tap)) remko -- View this message in context: http://r.789695.n4.nabble.com/One-silly-question-about-tapply-output-tp3015202p3015274.html Sent from the R help mailing list archive at Nabble.com.

Re: [R] How Plot, Axis and Rect work together?

2010-10-27 Thread Remko Duursma
Hi Alex, is this what you want? par(xaxs=i, yaxs=i, cex.axis=0.3) plot(1, type='n', ann=FALSE, axes=FALSE,xlim=c(0,100),ylim=c(0,100)) axis(1, at=1:100) axis(2, at=1:100) abline(h=1:100,col=grey) abline(v=1:100,col=grey) X - sample(1:100, 10) Y - sample(1:100, 10) rect(X,Y,X+1,Y+1,col=red)

Re: [R] calculate area between intersecting polygons

2010-10-26 Thread Remko Duursma
Here is a different solution: library(gpclib) p1 - as(poly1, gpc.poly) p2 - as(poly2, gpc.poly) area.poly(p2) + area.poly(p1) - area.poly(union(p1,p2)) I.e., take areas of both polygons and subtract the union (check plot(union(p1,p2)) ) to get the area of the intersection. greetings, Remko

Re: [R] datetime objects

2010-10-26 Thread Remko Duursma
like this: format(strptime(datetime, %m/%d/%Y %H:%M), %m/%d/%Y %H:%M %Z) remko -- View this message in context: http://r.789695.n4.nabble.com/datetime-objects-tp3013417p3013604.html Sent from the R help mailing list archive at Nabble.com. __

Re: [R] calculate area between intersecting polygons

2010-10-26 Thread Remko Duursma
I don't know why I forgot that you can do this as well : area.poly(intersect(p1,p2)) ... a bit more straightforward. greetings, Remko -- View this message in context: http://r.789695.n4.nabble.com/calculate-area-between-intersecting-polygons-tp3012980p3014581.html Sent from the R help

Re: [R] writing a table

2010-10-26 Thread Remko Duursma
This probably fixes it, although an example would be nice : write.csv(dfr, row.names=FALSE) you change the names with the ?names function before writing it to a csv file. remko -- View this message in context: http://r.789695.n4.nabble.com/writing-a-table-tp3014821p3014839.html Sent from

Re: [R] clinical data analysis

2010-10-26 Thread Remko Duursma
?prop.test -- View this message in context: http://r.789695.n4.nabble.com/clinical-data-analysis-tp3014811p3014856.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org mailing list

Re: [R] R-Fortran question (multiple subroutines)

2010-10-25 Thread Remko Duursma
Hi Berwin and all others who replied: that did the trick, thanks for your help! remko Actually, it turns out that this example is simplified enough. :) I put this snippet into a file, compiled it via R CMD SHLIB, loaded it into R and then was very surprised about the result of .Fortran(f,

Re: [R] calculate area between intersecting polygons

2010-10-25 Thread Remko Duursma
Dear Jonas, if you can write the difference in y-values between your polygons as a function, you can use integrate() to get the area between the polygons. It sounds like perhaps your x-values will not match between the polygons because they come from different sources, so you probably have to

[R] R-Fortran question (multiple subroutines)

2010-10-24 Thread Remko Duursma
,y,z) end subroutine g(x,y,z) z = x*y end calling this from R shows that subroutine g is not called. The code compiled as executable works fine. thanks, Remko - Remko Duursma Research Lecturer Centre for Plants and the Environment

[R] DLL not found

2010-10-19 Thread Remko Duursma
- Remko Duursma Research Lecturer Centre for Plants and the Environment University of Western Sydney Hawkesbury Campus Richmond NSW 2753 Mobile: +61 (0)422 096908 www.remkoduursma.com __ R-help@r-project.org

Re: [R] DLL not found

2010-10-19 Thread Remko Duursma
- Remko Duursma Research Lecturer Centre for Plants and the Environment University of Western Sydney Hawkesbury Campus Richmond NSW 2753 Mobile: +61 (0)422 096908 www.remkoduursma.com On Wed, Oct 20, 2010 at 10:00 AM, Duncan Murdoch murdoch.dun...@gmail.com wrote: On 19/10/2010 6

Re: [R] DLL not found

2010-10-19 Thread Remko Duursma
deleted it from the second library, but it still gives me the same error message. Remko - Remko Duursma Research Lecturer Centre for Plants and the Environment University of Western Sydney Hawkesbury Campus Richmond NSW 2753 Mobile: +61 (0)422 096908

Re: [R] fixing the dispersion parameter in glm

2010-09-28 Thread Remko Duursma
How about: y[y[,2] %in% x.samp[,2],] gives you the subset of y where values in the second column are restricted to your sample from x. You can then sample from this matrix, if you need to... greetings, Remko -- View this message in context:

Re: [R] subtraction based on two groups in a dataframe

2010-09-27 Thread Remko Duursma
Try something like this: dfr - read.table(textConnection(plate.id well.id Group HYB rlt1 1 P1 A1 Control SKOV3hyb 0.190 2 P1 A2 Control SKOV3hyb 0.210 3 P1 A3 Control SKOV3hyb 0.205 4 P1 A4 Control SKOV3hyb 0.206 5 P1

Re: [R] Storing CA Results to a Data Frame?

2010-09-26 Thread Remko Duursma
Please provide a reproducible example, like: library(ca) data(author) p - ca(author) # now look at this: str(p) to find that this object of class 'ca' has lots of different results in it - it is up to you to decide which ones you make into a dataframe. cheers, Remko -- View this message

Re: [R] matrix help

2010-09-26 Thread Remko Duursma
I think you want ?solve ... Remko -- View this message in context: http://r.789695.n4.nabble.com/matrix-help-tp2714378p2714896.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org mailing list

Re: [R] Arrange values on a timeline

2010-07-15 Thread Remko Duursma
- Remko Duursma Research Lecturer Centre for Plants and the Environment University of Western Sydney Hawkesbury Campus Richmond NSW 2753 Dept of Biological Science Macquarie University North Ryde NSW 2109 Australia Mobile: +61 (0)422 096908 www.remkoduursma.com

Re: [R] Faster union of polygons?

2010-06-04 Thread Remko Duursma
/2010 04:54 PM, Remko Duursma wrote: Thanks for the tip - this cleans up the code a lot! Unfortunately, there is no gain in speed. Playing a little bit dirty, punion -    function(...) {    n - nargs()    if (0L == n) new(gpc.poly)    else if (1L == n is(..1, gpc.poly)) ..1    else

Re: [R] Faster union of polygons?

2010-06-03 Thread Remko Duursma
('union', x) leaveout - Unionall(leaves) On Tue, Jun 1, 2010 at 9:53 PM, Remko Duursma remkoduur...@gmail.com wrote: Dear R-helpers, thanks for yesterday's speeding-up tip. Here is my next query: I have lots of polygons (not necessarily convex ones, and they never have holes) given by x

Re: [R] Faster union of polygons?

2010-06-02 Thread Remko Duursma
Baptiste, thanks for the tip but this would give me an approximate union, and I really need a (nearly) exact one. I am also not sure how to set the alpha parameter in a non-arbitrary way. Remko - Remko Duursma Research Lecturer Centre

[R] Faster matrix operation?

2010-06-01 Thread Remko Duursma
- Remko Duursma Research Lecturer Centre for Plants and the Environment University of Western Sydney Hawkesbury Campus Richmond NSW 2753 Dept of Biological Science Macquarie University North Ryde NSW 2109 Australia Mobile: +61 (0)422 096908

[R] Faster union of polygons?

2010-06-01 Thread Remko Duursma
(leavesoutline) thanks! Remko - Remko Duursma Research Lecturer Centre for Plants and the Environment University of Western Sydney Hawkesbury Campus Richmond NSW 2753 Dept of Biological Science Macquarie University North Ryde NSW 2109 Australia

[R] Plot polygon in 3D with rgl

2010-05-09 Thread Remko Duursma
, delaunayn(m))) plot3d(m[,1],m[,2],m[,3], type='l', col=black, size=2) rgl.triangles(m[tm, 1], m[tm, 2], m[tm, 3], col=green) - Remko Duursma Research Lecturer Centre for Plants and the Environment University of Western Sydney Hawkesbury Campus

Re: [R] Plot polygon in 3D with rgl

2010-05-09 Thread Remko Duursma
Duncan, thanks for the tip! I actually saw this 2D function but had no idea how to use it in 3D. Works great. Remko - Remko Duursma Research Lecturer Centre for Plants and the Environment University of Western Sydney Hawkesbury Campus Richmond

[R] SHLIB not working (Win Vista)

2010-03-29 Thread Remko Duursma
- Remko Duursma Research Lecturer Centre for Plants and the Environment University of Western Sydney Hawkesbury Campus Richmond NSW 2753 Dept of Biological Science Macquarie University North Ryde NSW 2109 Australia Mobile: +61 (0)422 096908 www.remkoduursma.com

Re: [R] Data sets with usage in documentation object 'data' but not in the code

2010-03-29 Thread Remko Duursma
- Remko Duursma Research Lecturer Centre for Plants and the Environment University of Western Sydney Hawkesbury Campus Richmond NSW 2753 Dept of Biological Science Macquarie University North Ryde NSW 2109 Australia Mobile: +61 (0)422 096908 www.remkoduursma.com

Re: [R] processing all files with certain extension in a directory

2010-01-15 Thread Remko Duursma
Albert, try something like this: extfiles - list.files(pattern=.ext) for(f in extfiles){ process.data(f) #etc } greetings, Remko - Remko Duursma Post-Doctoral Fellow Centre for Plants and the Environment University of Western Sydney

Re: [R] How to delete matrix rows based on NA frequency?

2010-01-15 Thread Remko Duursma
- Remko Duursma Post-Doctoral Fellow Centre for Plants and the Environment University of Western Sydney Hawkesbury Campus Richmond NSW 2753 Dept of Biological Science Macquarie University North Ryde NSW 2109 Australia Mobile: +61 (0)422 096908 www.remkoduursma.com 2010/1/15 Joel Fürstenberg

Re: [R] Export R output to Word/RTF?

2009-12-13 Thread Remko Duursma
http://en.wikipedia.org/wiki/Software_release_life_cycle#Beta r - Remko Duursma Post-Doctoral Fellow Centre for Plants and the Environment University of Western Sydney Hawkesbury Campus Richmond NSW 2753 Dept of Biological Science Macquarie

Re: [R] vector as data.frame element?

2009-11-30 Thread Remko Duursma
this: mylis[[which(index == 0)]] [1] x mylis[[which(index == 1)]] [1] y z Is that what you want? Remko - Remko Duursma Post-Doctoral Fellow Centre for Plants and the Environment University of Western Sydney Hawkesbury Campus Richmond NSW 2753 Dept

Re: [R] Is there a function to test if all the elements in a vector are unique

2009-11-30 Thread Remko Duursma
any(duplicated(c(1,2,2))) r - Remko Duursma Post-Doctoral Fellow Centre for Plants and the Environment University of Western Sydney Hawkesbury Campus Richmond NSW 2753 Dept of Biological Science Macquarie University North Ryde NSW 2109 Australia

Re: [R] Concave hull

2009-11-25 Thread Remko Duursma
See the function 'convhulln' in the 'geometry' package. It uses this algorithm : http://www.qhull.org/ remko - Remko Duursma Post-Doctoral Fellow Centre for Plants and the Environment University of Western Sydney Hawkesbury Campus Richmond NSW

Re: [R] Concave hull

2009-11-25 Thread Remko Duursma
Oh right I think I did not catch that *because of* the caps. Sorry. r - Remko Duursma Post-Doctoral Fellow Centre for Plants and the Environment University of Western Sydney Hawkesbury Campus Richmond NSW 2753 Dept of Biological Science

Re: [R] 3D plot, rotatable and with adjustable symbols

2009-11-19 Thread Remko Duursma
Try the rgl package. r - Remko Duursma Post-Doctoral Fellow Centre for Plants and the Environment University of Western Sydney Hawkesbury Campus Richmond NSW 2753 Dept of Biological Science Macquarie University North Ryde NSW 2109 Australia

Re: [R] Print methods

2009-11-09 Thread Remko Duursma
Because print.foo is not defined if you only include the function g in your namespace. remko - Remko Duursma Post-Doctoral Fellow Centre for Plants and the Environment University of Western Sydney Hawkesbury Campus Richmond NSW 2753 Dept

Re: [R] 19900501 into 1990-05-01

2009-11-05 Thread Remko Duursma
Something like: format(as.Date(20090501,format=%Y%m%d), %Y %m %d) r - Remko Duursma Post-Doctoral Fellow Centre for Plants and the Environment University of Western Sydney Hawkesbury Campus Richmond NSW 2753 Dept of Biological Science Macquarie

Re: [R] spliting a word into letters

2009-11-04 Thread Remko Duursma
strsplit(hello,)[[1]] r - Remko Duursma Post-Doctoral Fellow Centre for Plants and the Environment University of Western Sydney Hawkesbury Campus Richmond NSW 2753 Dept of Biological Science Macquarie University North Ryde NSW 2109 Australia

[R] system() or shell() with python script

2009-10-20 Thread Remko Duursma
? thanks, Remko - Remko Duursma Post-Doctoral Fellow Centre for Plants and the Environment University of Western Sydney Hawkesbury Campus Richmond NSW 2753 Dept of Biological Science Macquarie University North Ryde NSW 2109 Australia Mobile

Re: [R] Possible bug in plot.POSIXct regarding x axis

2009-10-19 Thread Remko 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. - Remko Duursma Post-Doctoral Fellow Centre for Plants and the Environment

Re: [R] R user defined language file for NotePad++

2009-10-08 Thread Remko Duursma
it. Remko - Remko Duursma Post-Doctoral Fellow Centre for Plants and the Environment University of Western Sydney Hawkesbury Campus Richmond NSW 2753 Dept of Biological Science Macquarie University North Ryde NSW 2109 Australia Mobile: +61 (0)422

[R] How to set default plotting colors by treatment?

2009-09-14 Thread Remko Duursma
this is, and how to fix this? thanks for your help Remko - Remko Duursma Post-Doctoral Fellow Centre for Plants and the Environment University of Western Sydney Hawkesbury Campus Richmond NSW 2753 Dept of Biological Science Macquarie University

Re: [R] How to set default plotting colors by treatment?

2009-09-14 Thread Remko Duursma
col=c(blue,red)mydfr$[treatment] Yes, but I would like to use the function for lots of other dataframes as well, so embedding 'mydfr' in the function is not the ideal solution... remko - Remko Duursma Post-Doctoral Fellow Centre for Plants

Re: [R] How to set default plotting colors by treatment?

2009-09-14 Thread Remko Duursma
The example is reproducible! Did you see the first post? remko - Remko Duursma Post-Doctoral Fellow Centre for Plants and the Environment University of Western Sydney Hawkesbury Campus Richmond NSW 2753 Dept of Biological Science Macquarie

Re: [R] RGoogleDocs/RCurl through proxy

2009-08-20 Thread Remko Duursma
the Google Docs authorization by turning the proxy off; options( RCurlOptions = list(verbose = TRUE, proxy = )) And then turn it back on, I can connect just fine. thanks, Remko - Remko Duursma Post-Doctoral Fellow

[R] RGoogleDocs/RCurl through proxy

2009-08-18 Thread Remko Duursma
server and the port number. (Windows XP). thanks, Remko - Remko Duursma Post-Doctoral Fellow Centre for Plants and the Environment University of Western Sydney Hawkesbury Campus Richmond NSW 2753 Dept of Biological Science Macquarie University

Re: [R] Plot(x,y)

2009-08-16 Thread Remko Duursma
What is the problem exactly? Remko - Remko Duursma Post-Doctoral Fellow Centre for Plants and the Environment University of Western Sydney Hawkesbury Campus Richmond NSW 2753 Dept of Biological Science Macquarie University North Ryde NSW 2109

Re: [R] Build a dataframe row by row?

2009-08-04 Thread Remko Duursma
, resultlis)) greetings, Remko - Remko Duursma Post-Doctoral Fellow Centre for Plants and the Environment University of Western Sydney Hawkesbury Campus Richmond NSW 2753 Dept of Biological Science Macquarie University North Ryde NSW 2109 Australia

Re: [R] Build a dataframe row by row?

2009-08-04 Thread Remko Duursma
you mean, can you give a specific example? remko -N On 8/4/09 4:57 PM, Remko Duursma wrote: Hi Noah, there are a few ways to do this. Easiest is to keep adding an element to a list, and then make it into a dataframe at the end, like this: resultlis- list() for(i in 1:10){ # your

Re: [R] combine venn diagram and pie chart

2009-08-02 Thread Remko Duursma
Search on http://finzi.psych.upenn.edu/search.html gives lots of hits on pie chart. See for example ?pie3D in the plotrix package. Or, be more specific about what you are looking for. Remko - Remko Duursma Post-Doctoral Fellow Centre for Plants

Re: [R] Assigning rank based on total count

2009-07-23 Thread Remko Duursma
- Remko Duursma Post-Doctoral Fellow Centre for Plants and the Environment University of Western Sydney Hawkesbury Campus Richmond NSW 2753 Dept of Biological Science Macquarie University North Ryde NSW 2109 Australia Mobile: +61 (0)422 096908 On Fri, Jul 24, 2009 at 8:45 AM

[R] Problem with as.POSIXct on dates object

2009-07-19 Thread Remko Duursma
- Remko Duursma Post-Doctoral Fellow Centre for Plants and the Environment University of Western Sydney Hawkesbury Campus Richmond NSW 2753 Dept of Biological Science Macquarie University North Ryde NSW 2109 Australia Mobile: +61 (0)422 096908

Re: [R] Problem with as.POSIXct on dates object

2009-07-19 Thread Remko Duursma
- Remko Duursma Post-Doctoral Fellow Centre for Plants and the Environment University of Western Sydney Hawkesbury Campus Richmond NSW 2753 Dept of Biological Science Macquarie University North Ryde NSW 2109 Australia Mobile: +61 (0)422 096908 On Mon, Jul 20, 2009 at 1:41 PM, Gabor

[R] Box-counting dimension and package 'fdim'

2009-04-23 Thread Remko Duursma
there. Does anyone know of an implementation of this algorithm in R, or elsewhere, or uses the fdim package successfully and can help me out? thanks, Remko - Remko Duursma Post-Doctoral Fellow Centre for Plant and Food Science University

Re: [R] reading scanned graphs

2009-03-03 Thread Remko Duursma
Check out http://www.datathief.org/ Remko - Remko Duursma Post-Doctoral Fellow Centre for Plant and Food Science University of Western Sydney Hawkesbury Campus Richmond NSW 2753 Dept of Biological Science Macquarie University North Ryde NSW

[R] interpSpline with dates?

2009-02-25 Thread Remko Duursma
- interpSpline(yvar ~ Date, testdfr) preddfr - data.frame(Date=as.POSIXct(2008-08-02)) predict(sp, preddfr) thanks, Remko - Remko Duursma Post-Doctoral Fellow Centre for Plant and Food Science University of Western Sydney Hawkesbury Campus Richmond

Re: [R] interpSpline with dates?

2009-02-25 Thread Remko Duursma
Thanks for that... the error message threw me off. r - Remko Duursma Post-Doctoral Fellow Centre for Plant and Food Science University of Western Sydney Hawkesbury Campus Richmond NSW 2753 Dept of Biological Science Macquarie University North

[R] Running examples failed (but there are none).

2009-02-12 Thread Remko Duursma
, there are no problems. Any pointers? thanks Remko - Remko Duursma Post-Doctoral Fellow Centre for Plant and Food Science University of Western Sydney Hawkesbury Campus Richmond NSW 2753 Dept of Biological Science Macquarie University North

Re: [R] R Help

2009-02-12 Thread Remko Duursma
x - list(integer(0),1,2) x[sapply(x, length) 0] - Remko Duursma Post-Doctoral Fellow Centre for Plant and Food Science University of Western Sydney Hawkesbury Campus Richmond NSW 2753 Dept of Biological Science Macquarie University North Ryde

[R] How to tell if lattice is current device?

2009-02-11 Thread Remko Duursma
() or another lattice function? dev.cur() does not help me, it just tells me windows 2. (Windows XP). thanks Remko - Remko Duursma Post-Doctoral Fellow Centre for Plant and Food Science University of Western Sydney Hawkesbury Campus Richmond NSW 2753

Re: [R] How to tell if lattice is current device?

2009-02-11 Thread Remko Duursma
Thanks for the tip. I did some reading on setHook, etc.. but I am terribly confused. Do you (or someone else!) have a quick example of what the call will look like? thanks remko - Remko Duursma Post-Doctoral Fellow Centre for Plant and Food

Re: [R] pause in function execution

2009-02-09 Thread Remko Duursma
Have you tried flush.console() ? r - Remko Duursma Post-Doctoral Fellow Centre for Plant and Food Science University of Western Sydney Hawkesbury Campus Richmond NSW 2753 Dept of Biological Science Macquarie University North Ryde NSW 2109

Re: [R] Ignore text when reading data

2009-01-28 Thread Remko Duursma
this can be done prettier, but whatever) z - paste(mydata, collapse=\n) read.table(textConnection(z)) greetings Remko - Remko Duursma Post-Doctoral Fellow Centre for Plant and Food Science University of Western Sydney Hawkesbury Campus Richmond NSW

Re: [R] Ignore text when reading data

2009-01-28 Thread Remko Duursma
Sorry, forgot this line after the textConnection bit: r - readLines(myfile) - Remko Duursma Post-Doctoral Fellow Centre for Plant and Food Science University of Western Sydney Hawkesbury Campus Richmond NSW 2753 Dept of Biological Science

Re: [R] Goodness of fit for gamma distributions

2009-01-27 Thread Remko Duursma
- Remko Duursma Post-Doctoral Fellow Centre for Plant and Food Science University of Western Sydney Hawkesbury Campus Richmond NSW 2753 Dept of Biological Science Macquarie University North Ryde NSW 2109 Australia Mobile: +61 (0)422 096908 On Tue, Jan 27, 2009 at 3:38 AM, Dan31415 d.m.mitch

Re: [R] Goodness of fit for gamma distributions

2009-01-27 Thread Remko Duursma
parameters: shapeest - 1.101 rateest - 2.49 h - hist(mydata, breaks=50, plot=FALSE) plot(h$mids, log(h$density)) curve(log(dgamma(x, shape=shapeest, rate=rateest)), add=TRUE) #Remko - Remko Duursma Post-Doctoral Fellow Centre for Plant and Food Science

Re: [R] plot: abline() - define line length

2009-01-21 Thread Remko Duursma
- temp } else { a - temp[1] b - temp[2] } } segments(x0=from,x1=to, y0=a+from*b,y1=a+to*b,...) } - Remko Duursma Post-Doctoral Fellow Centre for Plant and Food Science University

Re: [R] scanning text file to extract particular word

2008-11-11 Thread remko duursma
Hi Sit, # Read the data: dat - scan(textConnection( 0.293290E-05 0.117772E-05 -0.645205 *rs2282755* 0.307521E-05 0.000314 0.412997 *rs1336838* 0.484017E-05 0.218311 0.188669 *rs2660664 rs967785* 0.977861E-05 0.070474 0.294653

[R] multiple next in for loops?

2008-11-11 Thread remko duursma
Dear R list, I was wondering if there is an easy fix to this problem (there are workarounds, as always): Within a for loop, we can use next to skip to the next index, but how can we skip the next n indices? So, I would like something that looks like; for(i in 1:10){

[R] paste: multiple collapse arguments?

2008-08-25 Thread remko duursma
Dear R-helpers, I have a numeric vector, like: x - c(1,2,3,4,5,6) I make this into a string for output to a text file, separated by \n: paste(x, collapse=\n) Is there a way to alternate the collapse argument? So between the first two elements of x, I want to separate by , then by \n, and

Re: [R] Simple (?) subset problem

2008-08-14 Thread remko duursma
# Trim white space (leading and/or trailing). Includes tabs. trim - function(str)gsub('^[[:space:]]+', '', gsub('[[:space:]]+$', '', str)) # levels(SurveyData$direction_) - trim(levels(SurveyData$direction_)) Date: Thu, 14 Aug 2008 15:55:38 -0700 From: [EMAIL PROTECTED] To:

[R] Help on vectorizing

2008-03-09 Thread remko duursma
r, and want to find x. # I have a (very) ugly solution: chars - paste(r,collapse=)zeros - strsplit(chars,1)x - nchar(zeros[[1]]) Thanks for your help! Remko Duursma [[alternative HTML version deleted]] __ R-help@r-project.org mailing list