Displaying 20 results from an estimated 27 matches for "tom_roche".
2012 Sep 02
5
[newbie] scripting remote check for R package
...EXEC_NAME='whatever'
for S in 'foo' 'bar' 'baz' ; do
ssh ${RSERVER} "${EXEC_NAME} --version"
done
periodically. I'm wondering, what incantation to utter (bash preferred)
via ssh to query a given server's R for a given package?
TIA, Tom Roche <Tom_Roche at pobox.com>
2012 Feb 15
2
[newbie] separating plot output from debug output
...), intermediate)
}
pdf(...)
for each part of intermediate {
plot(process2(part))
}
cleanup # does dev.off()
Again, feasible but kludgey.
4 No status and debug messages. I hope to be that good someday :-)
Am I missing something? Are there clean solutions to this problem?
TIA, Tom Roche <Tom_Roche at pobox.com>
2012 Dec 31
2
code to convert 3D geographical coordinates to Cartesian?
...uses the mathematics convention that
azimuth=? and polar angle=? (vs the reverse physics convention).
Net: the task seems straightforward enough, but there's certainly scope
for error, so I'd prefer to use tested, well-used code if available.
Am I missing something?
TIA, Tom Roche <Tom_Roche at pobox.com>
2012 Feb 06
1
[newbie] storage/use of user's own functions?
...relative path from one's R cwd, or an FQ
path to, the personal-functions folder?
Apologies if this is a FAQ, but I didn't see anything about it @
http://cran.r-project.org/doc/FAQ/R-FAQ.html
http://cran.r-project.org/doc/manuals/R-admin.html
or in casual rseek-ing.
TIA, Tom Roche <Tom_Roche at pobox.com>
2012 Jan 04
3
[newbie] stack operations, or functions with side effects (or both)
...", vector_arg[2:lv])
+ return(ret)
+ }
>
> pop2(s)
[1] 1
> print(s)
[1] 1 2 3 4 5
ditto :-( What am I missing?
* Is there already a stack API for R (which I would expect)? If so, where?
* How to cause the desired side effect to the argument in the code above?
TIA, Tom Roche <Tom_Roche at pobox.com>
2012 Nov 18
2
[newbie] convert 3D spatial array to dataframe
...3 7 1 3
...
9 1 1 75
10 1 1 76
11 1 1 77
...
9 1 5 383
10 1 5 384
11 1 5 385
How to do that? I'm guessing this involves function=reshape, but I can't
see how to make `reshape` work for this usecase.
TIA, Tom Roche <Tom_Roche at pobox.com>
2012 Jul 23
2
translating IDL to R
...rtunately, I need to
generate some datasets for which instructions are provided only in
IDL (see listings following my .sig).
However I have R in both work environments, and love it. So if there
are any experts in IDL-to-R porting out there, I'd appreciate your
assistance.
TIA, Tom Roche <Tom_Roche at pobox.com>---2 IDL routines follow to EOF---
from ftp://gfed3:dailyandhourly at zea.ess.uci.edu/GFEDv3.1/Readme.pdf
;++++++++++++++++++++ idl code to generate daily emissions +++++++++
nlon=720 ; number of grid points by longitude
nlat=360 ; number of grid points by latitude
gfedmly=fltarr(...
2012 Aug 28
4
[ncdf4] error converting GEIA data to netCDF
...).
(And, in case you're wondering:
- I'm not just ncvar_put'ing the data for the exercise: I want the
GEIA data in netCDF format for subsequent use.
- I tried to find the GEIA data distributed in netCDF format, and
asked around, but have gotten no responses.
) TIA, Tom Roche <Tom_Roche at pobox.com>
2012 May 01
1
[fields:image.plot] subtitle under title (not image)?
...quantiles.formatted),
main=title, sub=subtitle)
lines(map)
} else {
plot(0, type="n", axes=F, xlab="", ylab="",
xlim=range(x.centers), ylim=range(y.centers),
main=title, sub=subtitle)
lines(map)
} # end testing data
TIA, Tom Roche <Tom_Roche at pobox.com>
2012 Nov 09
1
decorating API in R
...ignorance of the R object models and dependency management, before I put much scarce time into researching this, I thought I'd ask the community for suggestions, references, and especially examples for how to do this in R, especially how to extend one R package with another.
TIA, Tom Roche <Tom_Roche at pobox.com>
2012 Sep 11
2
R equivalent of python module structure and functionality?
...ne via, e.g.,
$ /path/to/cmdline.py
2. importable without mere import causing execution of the script's
functionality, e.g.,
>>> sys.path.append('/path/to')
>>> from cmdline import *
>>> process_command_line(...)
How to do this in R?
TIA, Tom Roche <Tom_Roche at pobox.com>
2012 Sep 06
1
[Rscript] difficulty passing named arguments from commandline
...> Calls: eval -> eval
> Execution halted
Must the quoting be so strict/brittle, or am I missing something?
Also, It Would Be Nice if there was more in the `help(Rscript)` examples
about argument passing. I for one found the current examples quite terse
and unhelpful.
TIA, Tom Roche <Tom_Roche at pobox.com>
2012 Jan 05
1
[ncdf] programmatically copying a netCDF file
...-h source.nc ) <( ncdump -h target.nc ) | wc -l
0
* programmatically: no or minimal hand-coding of, e.g., attribute
names and values, missing-value value.
? If not, can this be done in principle, or are there steps that must
(at least currently) necessarily be hand-coded?
TIA, Tom Roche <Tom_Roche at pobox.com>
2012 Oct 21
1
[newbie] failure to plot a RasterLayer with raster::plot or fields::image.plot
...e code, and
diagnose the problem. Note that both output and code will remain public,
hopefully to be useful to the next person attempting this sort of task.
And of course I will be sure to annotate the code and project docs to
give credit to whoever helps fix this!
thanks in advance, Tom Roche <Tom_Roche at pobox.com>
2012 Feb 03
3
[fields] image.plot abends with NAs in image.plot.info
...FALSE
which then causes the exception above.
How to proceed? If there's a better way to report the bug, please let
me know (and feel free to forward). I can debug further if
instructions are provided. I can provide the offending dataset, but
it's fairly large (638 MB).
TIA, Tom Roche <Tom_Roche at pobox.com>
2012 Nov 20
2
[lattice] how to overlay a geographical map on a levelplot?
...atively small, quite self-contained example follows the quote
above, in which I plot toy data in the sort of lattice layout I need ...
except that each panel lacks a map appropriate to the spatial domain. If
your competencies extend to that, your assistance would be appreciated.
TIA, Tom Roche <Tom_Roche at pobox.com>
2013 Feb 13
1
[lattice] display a projected map on a layerplot
...;xpdf %s", lcc.pdf))
##### end example #####
The data looks right, in that it greatly resembles the original
example (from which the above is adapted), which follows my .sig.
However the original-example code *does* draw a map, while the code
above does not. How to fix?
TIA, Tom Roche <Tom_Roche at pobox.com> <Roche.Tom at epa.gov>
---------------original example follows to end of post---------------
# Following adapted from what is installed in my
# .../R/x86_64-pc-linux-gnu-library/2.14/m3AqfigExampleScript.r
# (probably by my sysadmin), which also greatly resembles
# https://w...
2013 Jan 27
1
CRAN-only "Hash Sum mismatch"
...package lists... Done
me at it:~ $ sudo aptitude install r-base r-base-core r-recommended r-base-dev
...
E: Failed to fetch http://lib.stat.cmu.edu/R/CRAN/bin/linux/debian/squeeze-cran/r-base-core_2.15.2-1~squeezecran.0_amd64.deb: Hash Sum mismatch
How to fix, or further debug?
TIA, Tom Roche <Tom_Roche at pobox.com>
2013 Apr 26
1
[newbie] how to find and combine geographic maps with particular features?
...39;d
also like to learn more about the general problems:
* How to combine maps when plotting using the different R graphics
packages (e.g., base, lattice, ggplot2)?
* How to find sources (i.e., R packages, map identifiers) for
arbitrary geographical and political features?
TIA, Tom Roche <Tom_Roche at pobox.com> <Roche.Tom at epa.gov>
2012 Nov 18
2
[lattice] format and rotation of strip text
...* rotated 90? CCW (i.e., to print the layer value
like the x-axis label)
+ the layer value truncated or rounded to some significant digits,
e.g., '1.1'
I suspect this can be done with strip.custom, but am not seeing how;
please enlighten!
Your assistance is appreciated, Tom Roche <Tom_Roche at pobox.com>