« first day (276 days earlier)      last day (2899 days later) » 

7:24 AM
Gabor commented about POSIXt class for dates, and he doesn't recommend it. stackoverflow.com/questions/6773529/…
 
7:51 AM
I still use posix dates
having been told a million times to use something else
I just tend to stick ,tz="UST" in everything!
 
8:05 AM
I must admit, I haven't taken the time to understand time zones.
So far I've been working on data from one time zone, so the need hasn't come up yet.
 
8:24 AM
snap
hmm, i want to plot vertical wind shear, but not quite sure how to go about it
 
 
1 hour later…
9:29 AM
Is this the right way to pass function arguments using sapply?
sapply(x, shear, height=height, v1=7.52, h1=10, v2=9.06, h2=58)
 
If shear is your function that accepts height, v1, h1, v2 and h2 arguments, then yes.
 
hmm
it doesn't seem to work
I wrote the function and it definately has those arguments. The error I get is
Error in FUN(X[[1L]], ...) : unused argument(s) (X[[1]])
 
Let's see your function.
I bet height will be the first argument. :)
 
function(height,v1,h1,v2,h2) { speedAtHeight(height,v2,h2,windShear(v1,v2,h1,h2)) }
maybe I can just plot the funciton directly rather than bothering with sapply
 
9:45 AM
Omit the height argument in your sapply call.
 
Ah!
and that was it... I had assumed that if you were specifying arguments, you specified all of them
thanks
 
10:01 AM
No prob. This "trick" applies to the entire apply family of functions snap snap.
(You know, the Addams family kind of snap snap.)
 
yup, noted!
I don't know why I was doing it though- Of course one can plot a function directly
 
10:52 AM
@RomanLuštrik I like your novel idea of suggesting to the OP to read the manuals
 
11:24 AM
I think it may pay off to give them a word of encouragement (+1 for a reproducible example, well formed question...) before blowing out the RTFM.
 
 
5 hours later…
4:04 PM
Let me get this straight. I create package structure using package.skeleton, put my .R files into /R and write in roxygen comments. After I'm done writing files, I just roxygenize them and it will generate .Rd files for me?
 
yes
 
Thanks JD.
I started writing a set of tools for my coworkers who work with GPS data and I thought it would be fun to give roxygen a try.
 
@RomanLuštrik I create a build script that does the roxygenize and all the rest. For my segue package it looks like this:
#! /bin/sh

cd segue/R/
rm -f *#*
rm -f *.#*
rm -f *.*~
rm .Rhistory
cd ../..

R CMD roxygen -d segue

rm ./segue/man/.onLoad.Rd
rm -r ./segue/inst/doc

R CMD build segue/
R CMD check segue_0.02.tar.gz
R CMD INSTALL segue segue_0.02.tar.gz
I clean up temp files, rox it, do some housekeeping, then build/check/install
 
Thanks for sharing, appreciate it.
 
you betcha. it's pretty simple but took me longer to figure out than I thought it should
 
4:20 PM
I just learned about .Rinstignore a few days ago and it's already saving me a lot of repetitive clicking. That way I can be really a pig (not to be confused with PIIG) and have all my junk files and folder inside the package directory. Keeps my "workspace" really tidy now.
 
4:32 PM
@JDLong for the clean-up probably better to use .Rbuildignore etc.
 
Whoops, I meant .Rbuildignore, not .Rinstignore.
 
@GavinSimpson thanks! I somehow had missed that before. Nifty
 
5:12 PM
I was thinking. Is there a native R way of reading data through a USB port?
 
is it possible to treat the USB port like a socket?
I haven't read anything in from a serial port in ages. Long before using R.
 
Dunno. But this post is fairly recent and is not encouraging: r.789695.n4.nabble.com/…
 
5:28 PM
A quick look over the r-devel list makes me think there's no quick R way to read from a usb port on windows. Mac and linux users may have /tty.usb, but I'm not that familiar how that goes.
 
6:17 PM
<- does not like whiners.
 
6:53 PM
Can you guys lend me a hand at closing this one? It's a duplicate. stackoverflow.com/questions/6794266/…
 
 
2 hours later…
9:12 PM
Just discovered the most amazing command ever implemented in R: searchXKCD()
 
@gsk3 yes it is awesome
 

« first day (276 days earlier)      last day (2899 days later) »