Displaying 20 results from an estimated 270 matches for "so14".
2005 Nov 17
3
changing figure size in Sweave
...=
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
2006 Sep 13
3
functions and strings
...f
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
2006 Feb 22
3
elements that appear only once
...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
...t;
>
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
..., 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
...(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
...ytic
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
2006 Jul 27
4
inserting rows into a matrix
...,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
...ines 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
2005 Jan 05
4
output from table() in matrix form
...cter
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
...o 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
...<- 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
...hod 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
2006 Nov 17
2
do.call("+", ...)
...ll(sum,sapply(1:4,f,simplify=FALSE))
[1] 2828
doesn't do what I want (I would like a 2x3 matrix whose elements are the
sum of corresponding elements in my list)
How to do this nicely?
--
Robin Hankin
Uncertainty Analyst
National Oceanography Centre, Southampton
European Way, Southampton SO14 3ZH, UK
tel 023-8059-7743
2005 Jun 13
3
extracting components of a list
...first and
third of jj, viz list (jj[[1]],jj[[3]]).
How to do this efficiently?
My only idea was to loop through jj, and set unwanted components to
NULL, but
FAQ 7.1 warns against this.
--
Robin Hankin
Uncertainty Analyst
National Oceanography Centre, Southampton
European Way, Southampton SO14 3ZH, UK
tel 023-8059-7743
2007 Dec 19
3
array addition
...,] 2 7 12 7 9
[2,] 4 9 14 8 10
[3,] 3 6 9 0 0
>
Note the zeros at lower-right.
Is there a ready-made solution to this?
--
Robin Hankin
Uncertainty Analyst and Neutral Theorist,
National Oceanography Centre, Southampton
European Way, Southampton SO14 3ZH, UK
tel 023-8059-7743
2004 Nov 15
2
argument rationalization
...erpret as h(1:20,rep(3,20),1:20,rep(1,20))
I haven't got any that need five yet, but this may change in the future.
How do I implement this desired behaviour nicely?
(I pass the arguments to .C(), which is why I need this).
--
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)
2004 Sep 08
3
do.call("[", ...) question
...(a,jj))
do.call("[",c(a,jj))
do.call("[",list(a,unlist(jj)))
Of course, the one that works is
do.call("[",list(a,jj[[1]],jj[[2]]))
but I don't know how long jj is apriori so this won't do.
--
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)
2004 Aug 10
2
Net rpc shutdown
...t; but got "[2004/08/10 16:45:58, 0]
utils/net_rpc.c:rpc_shutdown_internals(2766) - Shutdown of remote
machine failed" back).
Am I missing a switch?
Mark Lidstone
IT and Network Support Administrator
BMT SeaTech Ltd
Grove House, Meridians Cross, 7 Ocean Way
Ocean Village, Southampton. SO14 3TJ. UK
Tel: +44 (0)23 8063 5122
Fax: +44 (0)23 8063 5144
E-Mail: mailto:mark.lidstone@bmtseatech.co.uk
Website: www.bmtseatech.co.uk
========================================================================
==
Confidentiality Notice and Disclaimer:
The contents of this e-mail and any at...
2005 Jul 12
3
elegant matrix creation
...ents of x, starting with x[i], after the first "1"
As one goes along a row, one takes a product of the tail end of x,
until the zeroes kick in.
Am I missing some clever solution?
--
Robin Hankin
Uncertainty Analyst
National Oceanography Centre, Southampton
European Way, Southampton SO14 3ZH, UK
tel 023-8059-7743