Tom Roche Wed, 08 May 2013 20:38:12 -0400
I have two spatial grids defined the same way (i.e., same number of
rows and columns--and dimensions, both 2D). Wherever both
* the value of an element i,j in the first grid is NA
* the value of element i,j in the second grid is !NA
I want to copy
not using the
correct search terms). Feel free (in fact, be encouraged :-) to reply
directly to me as well as to the list (I'm on the digest, which gets
huge).
TIA, Tom Roche tom_ro...@pobox.com
__
R-help@r-project.org mailing list
https://stat.ethz.ch
https://stat.ethz.ch/pipermail/r-help/2013-May/353343.html
Is there a function 'foo' such that, given an array and a value,
iff the value is present in the array, it returns the index(s) of
the value? E.g.,
matrix(1:9, nrow=3) - grid
grid
[,1] [,2] [,3]
[1,]147
[2,]
(I'm on the digest, which gets huge).
TIA, Tom Roche tom_ro...@pobox.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.org/posting-guide.html
and provide commented
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_ro...@pobox.com roche@epa.gov
__
R-help@r-project.org mailing list
*does* draw a map, while the code
above does not. How to fix?
TIA, Tom Roche tom_ro...@pobox.com roche@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
of formats. Doing
*geospatial* statistics with *real-world data* requires the ability to
transform those various formats. I consider geospatiality to be a core
competency for R, and geographical - Cartesian transforms to be
fundamental to that: YMMV.
thanks again, Tom Roche tom_ro...@pobox.com
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_ro...@pobox.com
. But I have looked at several packages and am not seeing it. I
suspect that either it's so low-level that it's just not exposed as API,
or just that there is API but I'm not seeing it in the package docs
(hidden in plain sight). Hence I ask
Am I missing something?
TIA, Tom Roche tom_ro...@pobox.com
=list(cex=0.5)
)
)
# end example
If there's a lattice wiki or other way to user-contribute visualization
documentation, please lemme know. (For that matter, why is there not
something like an r-sig-vis?)
Your assistance is appreciated! Hoping this will be useful to others,
Tom Roche tom_ro
-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_ro...@pobox.com
https://stat.ethz.ch/pipermail/r-sig-geo/2012-November/016757.html
summary: How to overlay a geographical map on each panel in a lattice
(or Trellis), e.g., of levelplot's?
https://stat.ethz.ch/pipermail/r-help/2012-November/329714.html
Does [this] match what you are looking for?
Alas, no:
https://stat.ethz.ch/pipermail/r-sig-geo/2012-November/016757.html
summary: How to overlay a geographical map on each panel in a lattice
(or Trellis), e.g., of levelplot's?
https://stat.ethz.ch/pipermail/r-help/2012-November/329716.html
you need to launch the library 'latticeExtra'
That's
to before-and-after compare this to the results of a
reboxing, or 3D regridding, of this data, so I would prefer instead to
label each panel in the lattice with the _value_ of the level (an
atmospheric pressure), rather than the name or index of the level.
How to do that?
TIA, Tom Roche tom_ro
not seeing how;
please enlighten!
Your assistance is appreciated, Tom Roche tom_ro...@pobox.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.org/posting-guide.html
https://stat.ethz.ch/pipermail/r-help/2012-November/329454.html
see ?strip.custom in lattice
That showed me where to look in the lattice book: see (partial)
solution to this problem, and the followup problem, @
https://stat.ethz.ch/pipermail/r-help/2012-November/329479.html
Thanks! Tom Roche
() or signif() the values
obtained from array.3d.df$lev and displayed in the strips?
Your assistance is appreciated, Tom Roche tom_ro...@pobox.com
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide
this involves function=reshape, but I can't
see how to make `reshape` work for this usecase.
TIA, Tom Roche tom_ro...@pobox.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
a dataframe: am I missing something?
Thanks to zero_one for offlist pointer to reshape2::melt:
library(reshape2)
data.frame -
melt(array.3d, varnames=c(lon, lat, lev), value.name=conc)
library(lattice)
levelplot(conc ~ lon * lat | factor(lev), data = data.frame)
works!
thanks all, Tom Roche
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_ro...@pobox.com
__
R-help@r-project.org
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_ro...@pobox.com
https://stat.ethz.ch/pipermail/r-help/2012-October/326837.html
summary: spatial data to be input to a regional-scale environmental
model must (1) be converted to netCDF and then (2) regridded
(cropped, projected, increased resolution). In a public git
repository
://github.com/TomRoche/GEIA_to_netCDF/commit/f982de0660b10f380183e34a0f1557a4cb1c5bb7
accordingly (to use `interactive()`, anyway).
Thanks again! Tom Roche tom_ro...@pobox.com
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r
/module is both
1. callable from the OS commandline 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_ro
/323554.html
I also wanted to point Tom to CRAN packages
getopt
optparse
written specifically to support command-line argument parsing with R
Thanks, but again, I'm not seeing how those solve the given problem(s).
Am I missing something?
TIA, Tom Roche tom_ro...@pobox.com
://github.com/TomRoche/GEIA_to_netCDF/blob/master/netCDF.stats.to.stdout.r
your assistance is appreciated, Tom Roche tom_ro...@pobox.com
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http
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_ro...@pobox.com
__
R-help@r-project.org mailing list
https
in order to make
both Rscript and R available?)
3 Is there any reason to install R without Rscript? (Alternatively,
when I ask my admin to install Rscript, is there any objection
I should anticipate?)
your assistance is appreciated, Tom Roche tom_ro...@pobox.com
Rscript and
R available? (FWIW I believe the boxes are running CentOS, though
possibly RHEL 5 or 6.)
2 Is there any reason to install R without Rscript? Alternatively,
when I ask my admin to install Rscript, is there any objection
I should anticipate?
TIA, Tom Roche tom_ro...@pobox.com
reason to install R without Rscript? (Alternatively,
when I ask my admin to install Rscript, is there any objection
I should anticipate?)
thanks again, Tom Roche tom_ro...@pobox.com
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman
admin to do in order to make
both Rscript and R available?)
3 Is there any reason to install R without Rscript? (Alternatively,
when I ask my admin to install Rscript, is there any objection
I should anticipate?)
your assistance is appreciated, Tom Roche tom_ro...@pobox.com
.,
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_ro...@pobox.com
Tom Roche Mon, 27 Aug 2012 23:31:23 -0400
summary: I can successfully ncvar_put(...) data to a file, but when
I try to ncvar_get(...) the same data
in the one and only datavar
I get
Error in if (nc$var[[li]]$hasAddOffset) addOffset = nc$var[[li]]$addOffset
else addOffset = 0
Pascal Oettli: MERCI BEAUCOUP! (though I would have thanked you
earlier if I hadn't had to dig through the r-help digest first :-)
Tom Roche Mon, 27 Aug 2012 23:31:23 -0400
summary: I can successfully ncvar_put(...) data to a file, but when
I try to ncvar_get(...) the same data I get
Error
', the variable definition is prefixed
with '2'.
HTH, Tom Roche tom_ro...@pobox.com
current GEIA.to.netCDF.r code block follows to end of post
# code
# process input
library(maps) # on tlrPanP5 as well as clusters
Tom Roche Tue, Aug 28, 2012 at 4:23 PM
Can ncdf4 be made to fail more helpfully? E.g., to fail immediately
on nc_open without assignment?
David W. Pierce Tue, 28 Aug 2012 13:23:53 -0700
I'll see if there exists some way to do a better check for this.
TIA.
One of the many great things about
can point to
my error(s).
(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
summary: I believe I have ported the GFED IDL example routines to R
(following .sig to end of post). But there are some very loose ends,
notably 2 for-loops which need replaced by more R-ful code.
details:
Tom Roche Mon, 23 Jul 2012 21:59:54 -0400
[The GFED] example IDL code [from
ftp
work. And, unfortunately, 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
assistance is appreciated! Tom Roche tom_ro...@pobox.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.org/posting-guide.html
and provide commented, minimal, self
)
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_ro...@pobox.com
__
R-help@r-project.org mailing
Tom Roche Fri, Feb 3, 2012 at 11:16 AM
summary: image.plot-ing two sets of netCDF data, with the second
derived from the first.
Should have noted that the data (atmospheric emissions) in
* the second dataset is heavily positively-skewed. (This leads to a
problem with the legend when
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_ro...@pobox.com
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r
Tom Roche Wed, 15 Feb 2012 17:43:05 -0500
1 I'm plotting to PDF, so everytime I dev.off() creates a new file,
and I want everything in one file (as does my boss :-)
2 I'm doing the work on a cluster, where I very much do not have
root, and which has a fairly minimal set of installed
Or something completely different?
2 How to catch failure of system(...) calls, so as to fail fast?
(E.g., in case I try to run the R script without setting up the
modules first.)
TIA, Tom Roche tom_ro...@pobox.com
__
R-help@r-project.org mailing list
https
new to R, so I Could Be Wrong): R-forge
https://r-forge.r-project.org/
seems to be the canonical place to put R packages, and it's svn.
That can be finessed, e.g.,
http://cameron.bracken.bz/git-with-r-forge
FWIW, Tom Roche tom_ro...@pobox.com
__
R-help
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_ro...@pobox.com
__
R-help@r-project.org
are provided. I can provide the offending dataset, but
it's fairly large (638 MB).
TIA, Tom Roche tom_ro...@pobox.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.org
Tom Roche Mon, Jan 9, 2012 at 3:54 PM,
I need to copy most of a source file, modifying only part, and to
write a target file.
David William Pierce Thu, 12 Jan 2012 09:13:53 -0800
I'd advise against doing this. I think it's the wrong approach.
Better to use 'cp' to make a bit-for-bit copy
Tom Roche Thu, 12 Jan 2012 11:56:25 -0500
* I have access to the cluster [where I want to run R] configured
[in .ssh/config] such that I can `ssh t` from commandline.
1 I can open an R file on the cluster with
`C-x C-f /t:/home/me/onlyOrigDN2.r`
from my laptop, and note the following
Tom Roche Thu, 12 Jan 2012 11:56:25 -0500
* I have access to the cluster [where I want to run R] configured
[in my linux laptop's .ssh/config] such that I can `ssh t` from
commandline.
Note also that I'm using keychain
http://www.cyberciti.biz/faq/ssh-passwordless-login-with-keychain
summary: Programmatically copying NetCDF mostly works: thanks for your
assistance! However, 4 followup questions/responses (and motivation
provided) below regarding problems encountered.
details:
Tom Roche Thu, 05 Jan 2012 18:29:35 -0500
I need to do surgery on a large netCDF file (technically
[[1]] - NULL
out
}))
mystack - Stack$new()
mystack$push( 1 )
mystack$push( letters )
mystack$pop()
mystack$pop()
mystack$pop() # gives an error
Thanks again! Tom Roche tom_ro...@pobox.com
__
R-help@r-project.org mailing list
https
be hand-coded?
TIA, Tom Roche tom_ro...@pobox.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.org/posting-guide.html
and provide commented, minimal, self-contained
(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_ro...@pobox.com
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read
Should one ask questions relating to the R package 'ncdf' here? or
look for a more netCDF-oriented (but probably less R-oriented) list?
Why I ask:
I'm relatively new to R, which I've only used in the past for graphics.
I'm trying to learn R as an alternative to manipulating netCDF files
with NCO
that will allow me to output row-wise. Is there such a tool for R?
or ESS?
TIA, Tom Roche tom_ro...@pobox.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.org/posting
summary: how to read a row (not column) from a file into a vector (not a data
frame)?
details:
I'm using
$ lsb_release -ds
Linux Mint Debian Edition
$ uname -rv
3.0.0-1-amd64 #1 SMP Sun Jul 24 02:24:44 UTC 2011
$ R --version
R version 2.14.1 (2011-12-22)
I'm new to R (having previously used
Tom Roche 11-12-29 3:51 PM
E.g., for a file such that
$ head -n 2 ~/data/foo.csv | tail -n 1
5718,0.3,0.47,0,0,0,0,0,0,0,0,0.08,0.37,0,0,0.83,1.55,0,0,0,0,0,0,0,0,0,0.00,2.48,2.33,0.17,0,0,0,0,0,0,0.00,10.69,0.18,0,0,0,0
I'd like to be able to populate a vector 'v' s.t.
v[1]=5718, ... v[43
59 matches
Mail list logo