Displaying 20 results from an estimated 24 matches for "rksh1".
Did you mean:
rksh
2008 Sep 23
4
How to draw the graph of f(x,y) = x * y ?
Dear All,
The function curve() draws the graph of functions from R to R. Is
there some homologous function to curve() to draw functions from R^2
to R?
Thanks in advance,
Paul
2008 Sep 26
1
Generating a valid covariance matrix
I want to generate a valid variance-covariance matrix. One way could be to generate some random sample from multivariate normal distribution and then calculate cov. matrix. Another way could be to sample from wishart distribution itself. However both cases need a valid i.e. PD covariance matrix. As I need to generate that covariance matrix only, I am not interested those two methods. Can anyone
2009 Feb 19
2
vignette compilation times
Dear All
I am preparing a number of vignettes that require a very long time to
process with Sweave. The longest one takes 10 hours. I love the weaver
package!
Is a package that includes such a computationally intensive vignette
acceptable on CRAN? Are there any guidelines here?
--
Robin K. S. Hankin
Uncertainty Analyst
University of Cambridge
19 Silver Street
Cambridge CB3 9EP
2009 Jun 12
1
bundle deprecation
Hi
I read that bundles are to be deprecated in 2.10.
The BACCO bundle contains three packages
(emulator, calibrator, approximator) which I
am happy to unbundle.
But the 'BACCO' moniker has some considerable
cachet for me in terms of recognizability (eg
with grant-giving bodies), as it has become an umbrella
term for a whole bunch of related statistical
functionality of which the three
2008 Oct 26
3
weird behavior with the 3rd root....
Well, this is what i got...
> -0.0841219200008394^(1/3)
[1] -0.438163696867656
> (-0.0841219200008394)^(1/3)
[1] NaN
and i don't have a clue of why this happens or how to avoid it, any suggestions?
thank you,
Juan
2009 Dec 03
1
S4 and head() problems
Hi
I am having difficulty defining an S4 method for head() and tail().
I can't quite provide minimal self-contained code
because the problem appears to require the whole corpus
of my package; and there also appears to be a difference
between sourcing the lines directly, and having them
installed in a package.
The lines in question (I think) are:
setClass("mdm",
2008 Sep 23
1
Generalising to n-dimensions
Hi R-helpers,
I have two queries relating to generalising to n dimensions:
What I want to do in the first one is generalise the following statement:
expand<-expand.grid(1:x[1],1:x[2],...1:x[n]) where x is a vector of integers
and expand.grid gives every combination of the set of numbers, so for
example, expand.grid(1:2, 1:3) takes 1,2 and 1,2,3 and gives 1,1 2,1
1,2 2,2 1,3 2,3
My x
2010 Nov 10
1
S4 package warning
Hello everyone. R-2.12.0, suse linux 11.3.
I am debugging a package that uses S4 methods
and R CMD check gives the following warning:
> Warning in methods::findMethods(g, env) :
> non-generic function 'mdm' given to findMethods()
> See the information on DESCRIPTION files in the chapter 'Creating R
> packages' of the 'Writing R Extensions' manual.
I
2010 Jul 30
3
simple table/matrix problem
Hi
Given three vectors
x <- c(fish=3, dogs=5, bats=2)
y <- c(dogs=1, hogs=3)
z <- c(bats=3, dogs=5)
How do I create a multi-way table like the following?
> out
x y z
bats 2 0 3
dogs 5 1 5
fish 3 0 0
hogs 0 3 0
('out' is a matrix).
See how the first line shows 'x' has 2 bats, 'y' has zero bats, and 'z'
has 3 bats
and so on for each
2010 Jun 29
3
table() of a factor
Hi
suppose I have a factor 'x':
> x <- as.factor(c(rep("a",3),"b","d"))
> table(x)
x
a b d
3 1 1
>
>
But this is not what I want because
I need to include the fact that the count of "c" is zero.
I can't just change the levels of x:
> levels(x) <- c("a","b","c","d")
>
2009 Oct 16
1
generalization of tabulate()
Hi
I want a generalization of tabulate() which works on rows of a matrix.
Suppose I have an integer matrix 'observation':
> observation
y1 y2 y3
1 4 0
1 4 0
2 0 3
4 1 0
0 5 0
0 1 4
2 0 3
Each row corresponds to a (multivariate) observation. Note that the
first two rows are identical: this means that data "c(1,4,0)" was
observed twice.
Now suppose I can list the sample
2009 Sep 08
5
sparse vectors
Hi
I deal with long vectors almost all of whose elements are zero.
Typically, the length will be ~5e7 with ~100 nonzero elements.
I want to deal with these objects using a sort of sparse
vector.
The problem is that I want to be able to 'add' two such
vectors.
Toy problem follows. Suppose I have two such objects, 'a' and 'b':
> a
$index
[1] 20 30 100000000
2008 Sep 19
6
how to keep up with R?
Dear Listers,
I've been a big fan of R since graduate school. After working in the
industry for years, I haven't had many opportunities to use R and am mainly
using SAS. However, I am still forcing myself really hard to stay close to R
by reading R-help and books and writing R code by myself for fun. But by and
by, I start realizing I have hard time to keep up with R and am afraid that
I
2008 Sep 22
1
R-help Digest, Vol 67, Issue 23
...working with MSAccess+VBA, only
that I've never face this problem with variables), you should not suppose
everyone's stupid, though...
Thanks for your help,
Best regards
Jose Lozano
------------------------------
Message: 60
Date: Fri, 22 Aug 2008 09:15:20 +0100
From: Robin Hankin <rksh1@cam.ac.uk>
Subject: Re: [R] how to keep up with R?
To: a.ramasamy@imperial.ac.uk
Cc: r-help <r-help@stat.math.ethz.ch>, Barry Rowlingson
<b.rowlingson@lancaster.ac.uk>
Message-ID: <48AE7598.7060209@cam.ac.uk>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
A...
2009 Dec 09
1
formula () problems
Hi.
I am having difficulty creating a formula for use with glm()
I have a matrix of an unknown number of columns and wish to estimate a
coefficient for each column, and one for the each product of a column
with another column.
In the case of a five-column matrix this would be:
> x <- matrix(rnorm(100),ncol=5)
> colnames(x) <- letters[1:5]
> z <- rnorm(20)
> lm(z~
2009 Oct 23
1
access elements of a named list using a factor
Hi
I have a factor 'f' and a named list 'jj'.
I want names(jj) to match up with levels(f).
How do I use levels(f) to access elements of jj?
> f <- factor(c("pigs","pigs","slugs"))
> f
[1] pigs pigs slugs
Levels: pigs slugs
>
> jj <- list(pigs=1:10,slugs=1:3)
My attempts to produce jj$pigs all give errors:
>
2008 Dec 05
1
array indexing
Hi.
I have been pondering array indexing via matrices.
> a <- array(1:27,rep(3,3))
> index <- matrix(c(1,1,1,1,2,3),2,3,byrow=TRUE)
> a[index]
[1] 1 22
as expected and documented. But what was the thinking
behind the decision to access the array by rows rather
than columns?
The 'index' matrix is ordered as [1,1,1,2,1,3] and so
the extraction is a[index[c(1,3,5)]]
2011 Jan 25
1
NA printing
Hi.
I'm writing a print method for an object that includes a numeric matrix
for which
the lower diagonal elements are not meaningful. So I make the lower
diagonal of my matrix NA and print it.
But my co-author does not like NA there and wants a dash.
I have tried coercing the matrix to character, essentially by
M[is.na(M)] <- "-" but this interferes with the pleasing
column
2009 Jan 22
1
pdf() and pch problems
Hi
R-2.8.1, Suse 11.1
I'm having problems with pdf(). In the following
transcript, file 'f.pdf' does not use the expected symbols for the plot.
It uses a 'q' letter instead of the open circle I get when
viewing the graphics window.
I also get the same under r47678.
Does anyone else get this?
le112:~/scratch/R-2.8.1% R --vanilla --quiet
>
2009 Jan 22
1
pdf() and pch problems
Hi
R-2.8.1, Suse 11.1
I'm having problems with pdf(). In the following
transcript, file 'f.pdf' does not use the expected symbols for the plot.
It uses a 'q' letter instead of the open circle I get when
viewing the graphics window.
I also get the same under r47678.
Does anyone else get this?
le112:~/scratch/R-2.8.1% R --vanilla --quiet
>