Displaying 20 results from an estimated 367 matches for "oceanography".
2010 Sep 05
1
Greek symbols (again but more complicated)
...plotTimeXMastPAR <- qplot(DT,MastPAR, data=A, xlab = "", ylab = c("PAR", expression(mu, quote(E ~m^-2 ~s^-1))), geom="line") + opts(legend.position="none")
Cheers.
--------------
John Helly, UCSD / San Diego Supercomputer Center / Scripps Institution of Oceanography, Climate, Atmospheric Science, and Physical Oceanography / +01 760 840 8660 mobile / stonesteps (Skype) / stonesteps7 (iChat) / /www.sdsc.edu/~hellyj
2005 Nov 17
3
changing figure size in Sweave
...a hook:
<<echo=FALSE, print=FALSE, fig=TRUE>>=
options(SweaveHooks=list(fig=function() ps.options(width=1)))
library(graphics)
pairs(iris)
@
but this didn't change the size of the figure. How to make the
figures a
different size?
--
Robin Hankin
Uncertainty Analyst
National Oceanography Centre, Southampton
European Way, Southampton SO14 3ZH, UK
tel 023-8059-7743
2007 Oct 22
1
question on axis box with asp=1
...right to prevent R from using axes that I do not desire.
PS. I apologize for the length of this email; I'm just trying to be
clear, and also to show that I have at least done a little research
into the lovely R system.
Dan E. Kelley, Associate Professor phone:(902)494-1694
Oceanography Department, Dalhousie University fax:(902)494-3887
Halifax, Nova Scotia mailto:Dan.Kelley at Dal.CA
Canada B3H 4J1 http://oceanography.dal.ca/ocean_C699.html
2006 Sep 13
3
functions and strings
Hi
If
string <- "xyz"
f <- function(x){1 + sin(cos(x)) + exp(x^2)}
How do I manipulate "string" and f() to give the string
"1 + sin(cos(xyz)) + exp(xyz^2)"
?
--
Robin Hankin
Uncertainty Analyst
National Oceanography Centre, Southampton
European Way, Southampton SO14 3ZH, UK
tel 023-8059-7743
2008 Aug 01
5
viewing data in something similar to 'R Data Editor'
..., and tail() which just
allow me a quick peak at the object. I do not
want to edit the object in the table, but be able to watch the object change
while I run anything that would manipulate it.
Thank you for your help.
Best,
Rachel Schwartz
Graduate Student Researcher
UCSD; Scripps Institution of Oceanography
[[alternative HTML version deleted]]
2006 Feb 22
3
elements that appear only once
...uot;, because there is only one ash and
only one elm in my wood.
My Best Effort:
> names(table(a)[table(a)==1])
[1] "ash" "elm"
>
This doesn't seem particularly elegant to me; there must be a better
way!
anyone?
--
Robin Hankin
Uncertainty Analyst
National Oceanography Centre, Southampton
European Way, Southampton SO14 3ZH, UK
tel 023-8059-7743
2008 Mar 26
5
S4 slot with NA default
...uot;numeric"),prototype=list(x=NaN))
[1] "foo"
>
But this is not the correct sense: to me "NaN" means "not a number"
and I want
the sense to be "not available".
Any advice?
--
Robin Hankin
Uncertainty Analyst and Neutral Theorist,
National Oceanography Centre, Southampton
European Way, Southampton SO14 3ZH, UK
tel 023-8059-7743
2007 Mar 19
3
character to numeric conversion
....499809670330265066808481929, 2.602689685444383764768503589, 0.E-38]"
(the output is a single line). In a big run, the string may contain
10^5 or possibly 10^6 numbers.
What's the recommended way to convert this to a numeric vector?
--
Robin Hankin
Uncertainty Analyst
National Oceanography Centre, Southampton
European Way, Southampton SO14 3ZH, UK
tel 023-8059-7743
2004 Jun 11
4
rownames of single row matrices
...d,]))
rownames(out) <- rownames(a)[wanted]
return(out)
}
}
[note the transpose and as.matrix()]. There must be a better way!
Anyone got any better ideas?
What is the R rationale for treating a[1,] so differently from a[1:2,] ?
--
Robin Hankin
Uncertainty Analyst
Southampton Oceanography Centre
SO14 3ZH
tel +44(0)23-8059-7743
initialDOTsurname at soc.soton.ac.uk (edit in obvious way; spam precaution)
2005 Jan 07
1
Visualizing complex analytic functions using domain coloring
...domain colouring for visualizing complex analytic
functions
(such as elliptic functions)?
[
the idea is to depict a complex function f(z) using a filled.contour()
variant
in which the hue is given by Arg(f(z)), and the saturation by Mod(f(z)).
]
--
Robin Hankin
Uncertainty Analyst
Southampton Oceanography Centre
European Way, Southampton SO14 3ZH, UK
tel 023-8059-7743
2011 Sep 07
3
Editing the variables attributes section in the netCDF header of netCDF files created using the package ncdf.
Hi,
I am using the package ncdf to create netCDF files and I want to mimic the the header of an exiting netCDF file created outside of R. Below is what the existing header looks like (part of it that is different):
netcdf ccd1984_05_08 {
dimensions:
lat = 1974 ;
lon = 1894 ;
time = UNLIMITED ; // (1 currently)
variables:
int time(time) ;
2008 Jun 10
3
fitting periodic 'sine wave' model
...T)
# even this gave a max iteration error
r<-nls(y ~ A*sin(2*pi*F*x), start=list(A = 1, F = .5), trace=T)
I have a feeling I am approaching this incorrectly. Thank you all
very much for the guidance.
Jon
R 2.7.0
mac os 10.5
Jon Loehrke
Graduate Research Assistant
Department of Fisheries Oceanography
School for Marine Science and Technology
University of Massachusetts
200 Mill Road, Suite 325
Fairhaven, MA 02719
jloehrke at umassd.edu
T 508-910-6393
F 509-910-6396
2006 Jul 27
4
inserting rows into a matrix
...llowing:
> cbind(c(1,0,0,2,4,0,3),c(2,0,0,3,5,0,4),c(3,0,0,4,2,0,1))
[,1] [,2] [,3]
[1,] 1 2 3
[2,] 0 0 0
[3,] 0 0 0
[4,] 2 3 4
[5,] 4 5 2
[6,] 0 0 0
[7,] 3 4 1
>
anyone?
--
Robin Hankin
Uncertainty Analyst
National Oceanography Centre, Southampton
European Way, Southampton SO14 3ZH, UK
tel 023-8059-7743
2006 Feb 28
2
lines() and recycled colours
...("red","green"))
>
then all ten lines are red, with no warning given. Is there a reason
why
colour recycling would be a bad idea in this case?
Also, it would be nice if arguments such as lwd
were recycled if needed too.
--
Robin Hankin
Uncertainty Analyst
National Oceanography Centre, Southampton
European Way, Southampton SO14 3ZH, UK
tel 023-8059-7743
2004 Jun 15
2
S/R/RWeb/ODBC
...can be implemented in batch mode)? I'm currently using
Apache on Windows XP if relevant, but LINUX may be the final host (we'll
compare, but those more Web-wise than I expect LINUX to outperform Windows
for our purposes).
> Mark Fowler
> Marine Fish Division
> Bedford Inst of Oceanography
> Dept Fisheries & Oceans
> Dartmouth NS Canada
> fowlerm at mar.dfo-mpo.gc.ca
>
>
2005 Jan 05
4
output from table() in matrix form
...er way? It seems inelegant to coerce a character
vector back to integers,
but OTOH it's wasteful to have 20 bins when I only need 3. My real
application would have
maybe a dozen distinct (prime) integers in the range 2 up to about 1e4.
--
Robin Hankin
Uncertainty Analyst
Southampton Oceanography Centre
European Way, Southampton SO14 3ZH, UK
tel 023-8059-7743
2006 Oct 13
5
combinatorics
...dering sets of indistinguishable items?
suppose I have two A's, two B's and a C.
Then I want
AABBC
AABCB
AACBC
ABABC
. . .snip...
BBAAC
. . .snip...
CBBAA
[there are 5!/(2!*2!) = 30 arrangements. Note AABBC != BBAAC]
How do I do this?
--
Robin Hankin
Uncertainty Analyst
National Oceanography Centre, Southampton
European Way, Southampton SO14 3ZH, UK
tel 023-8059-7743
2007 Jan 16
5
"[[" gotcha
...to replace
>
The error is given because after B[[1]] <- a, the variable B is
just a scalar and
not a matrix (why is this?)
What's the bulletproof method for assigning matrices to a list (whose
length is
not known at runtime)?
--
Robin Hankin
Uncertainty Analyst
National Oceanography Centre, Southampton
European Way, Southampton SO14 3ZH, UK
tel 023-8059-7743
2006 Jul 25
2
pari/gp interface
...lling pari/gp from R?
Or any ideas for a more portable method than the one above?
[
PARI/GP is a widely used computer algebra system designed for fast
computations
in number theory. It is freely available at
http://pari.math.u-bordeaux.fr/
]
--
Robin Hankin
Uncertainty Analyst
National Oceanography Centre, Southampton
European Way, Southampton SO14 3ZH, UK
tel 023-8059-7743
2009 Aug 19
4
Confidence interval on parameters from optim function
...ny idea ?
Error in optim(c(0.08, 0.04, 1), f, NULL, method = "L-BFGS-B", lower =
c(0, :
L-BFGS-B needs finite values of 'fn'
Thank you for any information on these two problems.
Emmanuel
-------------------------------------------
Dr. Emmanuel Devred
Bedford Institute of Oceanography,
1 Challenger Drive,
Dartmouth, Nova Scotia, B2Y 4A2,
Canada
Ph: (1) 902 426-4681
Fax: (1) 902 426-9388
devrede@mar.dfo-mpo.gc.ca
http://myweb.dal.ca/edevred/
-------------------------------------------
[[alternative HTML version deleted]]