[R] Display warning only once in session

2014-08-25 Thread Berry Boessenkool
Hi, I'm writing a function that gives a warning in a certain scenario. Reading this once per R session will be enough. i.e. it's not necessary to be shown in subsequent function calls. What's the best way to implement this? Some package-specific option? Where would I find good information on

[R] LA useR ride

2014-06-17 Thread Berry Boessenkool
Hi, Is anyone travelling north after the useR! conference in Los Angeles and could give me a ride? I need to get to Medford, which is located along I5 in southern Oregon. Thanks ahead, Berry PS: sorry to bother the help list, but I could not find anything specific for useR.

[R] dim vector or data.frame

2014-02-14 Thread Berry Boessenkool
Hi, In my function, I want to allow input to be a vector or a data.frame. Certain operations need to be done if the length or nrows exceeds one, but since nrow doesn't work for vectors, I cannot simply use if( nrow(input)1 | length(input)1 ) ... So is there a more elegant way to do this then

[R] Leap hours?

2013-12-11 Thread Berry Boessenkool
Hi there, If you want to show off just how good R handles dates+times, forward this. I showed some colleagues difftime today, and encountered something interesting: difftime(ISOdatetime(1936:1947+1,1,1, 0,0,0), ISOdatetime(1936:1947,1,1, 0,0,0)) which returns the values 366, 365, 365, 365,

[R] T-shirt

2013-03-28 Thread Berry Boessenkool
Good morning to the German readers, I'm thinking about getting me a t-shirt with the proverb R-kenntnis ist der erste Schritt auf dem Weg zur Besserung (awareness is the first step towards improvement, the pun being that the first word can also be read as R-knowledge) 1. Could there be a

[R] expression exponent labeling

2013-03-13 Thread Berry Boessenkool
Hi all, I want to label an axis with exponents, but can't get it done with expression. Any hints would be very welcome! # simulated data, somewhat similarly distributed to my real data: set.seed(12); d - rbeta(1e6, 0.2,2)*150 ; d - d[d1e-8] hist( d  , breaks=100) # now on a logarithmically

[R] print justify

2013-03-06 Thread Berry Boessenkool
Hi everyone, I'm trying to print a table justified to the left, but it doesn't work. Any hints? KennArt - data.frame(NR=c(171,172,174,175,176,177,181,411,980), TYP=c(Körnermais,  Corn Cob Mix, Zuckermais, Mischanbau (Silo)Mais/Sonnenblumen,  Mais mit Bejagungsschneise in gutem

[R] tabstop in graphics

2013-01-14 Thread Berry Boessenkool
Hi, I'm curious about Tab stops in graphics: plot(1) text(1.2, 1.2, Char\nMoreChar) works fine, but text(1.2, 0.8, Char\tMoreChar) doesn't. Exporting with pdf tells me that the sign width is unknown. I'm not into informatics, so I don't know how a tabstop actually works. Is this at all

[R] deparse substitute

2013-01-09 Thread Berry Boessenkool
Hi, I'm writing a function that needs the input names (as characterstrings) as part of the output. With deparse(substitute( ) ) that works fine, until I replace all zeros with 0.001 (log is calculated at some time): tf - function(input) { input[input==0] - 0.001 ;

[R] avoid - in specific case

2012-10-05 Thread Berry Boessenkool
Hi all, I improved a function drawing horizontal histograms (code below) which uses barplot and works fine. It does,however, need to assign a function to the global environment to later find the actual location on the vertical axis, and not the number of bars used by barplot. Hopefully,

Re: [R] Changing character into date

2012-08-12 Thread Berry Boessenkool
Another helfpul function is strptime Berry -- View this message in context: http://r.789695.n4.nabble.com/Changing-character-into-date-tp4640079p4640088.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org mailing

[R] buffering output to the console

2012-08-02 Thread Berry Boessenkool
serious computing time issues with this setting? As posted in [5], calling flush.console too often takes a lot of time... Thanks very much, Berry Boessenkool, Potsdam [1] http://r.789695.n4.nabble.com/pause-in-function-execution-td882624.htm [2] http://cran.r-project.org/bin/windows/base/rw-FAQ.html

Re: [R] check whether connection can be opened

2012-07-19 Thread Berry Boessenkool
To: berryboessenk...@hotmail.com I think you'll need to roll your own using tryCatch() around open(). Michael On Jul 18, 2012, at 5:09 AM, Berry Boessenkool berryboessenk...@hotmail.com wrote: Hi all, I'm working on a function that reads online data that is only available

[R] check whether connection can be opened

2012-07-18 Thread Berry Boessenkool
via Rprofile). My brother (a computer schientist in progress) did not know a solution, so I set out to try this with R - which I got to work fine (except the above mentioned). R beats java, I told him, to which he responded nothing ;-) Isn't it amazing, what one can do with R? Thanks ahead, Berry

[R] access objects

2011-09-07 Thread Berry Boessenkool
are appreciated as well. Here's an example, I hope it clarifies what I'm trying to do: obj1 - 7:9 obj2 - 6:2 testf - function(k) plot(  noquote(paste(obj, k, sep=))  ) testf(1) # should plot obj1 - Berry Boessenkool D-14476 Potsdam (OT Golm

Re: [R] access objects

2011-09-07 Thread Berry Boessenkool
7, 2011 at 12:53 PM, Berry Boessenkool berryboessenk...@hotmail.com wrote: hi, say I have consecutively numbered objects obj1, obj2, ... in my R workspace. I want to acces one of them inside a function, with the number given as an argument. Where can I find help on how to do

[R] Histogram messed up

2011-09-06 Thread Berry Boessenkool
    attached base packages: [1] stats graphics  grDevices utils datasets  methods   base   - Berry Boessenkool D-14476 Potsdam - __ R

Re: [R] manipulating by lists and ave() functions

2011-07-09 Thread Berry Boessenkool
- Berry Boessenkool Potsdam - From: ivo.we...@gmail.com Date: Fri, 8 Jul 2011 16:22:18 -0700 To: wdun...@tibco.com CC: r-h...@stat.math.ethz.ch Subject: Re: [R] manipulating by lists and ave() functions It does

Re: [R] Polynomial fitting

2011-07-09 Thread Berry Boessenkool
- Berry Boessenkool Potsdam - Date: Fri, 8 Jul 2011 21:12:46 +0300 From: matti.joki...@gmail.com To: gerrit.eich...@math.uni-giessen.de CC: r-help@r-project.org Subject: Re: [R] Polynomial fitting Thank you Gerrit

Re: [R] Vertical Labels in plot graph - normally working fine but not on this graph

2011-07-08 Thread Berry Boessenkool
, labels = Labels) If you only want to use las, you can also use this as an arument in the axis function. HTH, Berry - Berry Boessenkool Potsdam - Date: Fri, 8 Jul 2011 13:20:51 +0100 From: statmailingli...@googlemail.com

[R] assign using =

2011-06-27 Thread Berry Boessenkool
? Or is it? Thanks ahead, Berry - Berry Boessenkool University of Potsdam, Germany - [[alternative HTML version deleted]] __ R-help@r

[R] show colums x till end

2011-06-27 Thread Berry Boessenkool
ahead, Berry - Berry Boessenkool University of Potsdam, Germany - __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r

Re: [R] How to export to pdf in landscape orientation?

2011-06-25 Thread Berry Boessenkool
Hey Juan, paper=a4r or USr for rotated (‘landscape’)) i.e. pdf(file='my_file.pdf', onefile=T, paper='A4r') plot(sin, -pi, 2*pi) ; dev.off() Greetings from Potsdam University, Germany, Berry Boessenkool From: jhernandezcabr...@gmail.com Date: Sat, 25 Jun 2011 18:46:28 +0100 To: r