Displaying 20 results from an estimated 10000 matches similar to: "Getting multiple matrix-values using a single command"
2011 Jan 20
4
puzzled with plotmath II
sorry, I forgot my sessionInfo: please see below.
-------- Original Message --------
Subject: puzzled with plotmath
Date: Thu, 20 Jan 2011 12:48:18 +0100
From: Claudia Beleites <cbeleites at units.it>
To: R Help <r-help at r-project.org>
Dear all,
I'm puzzled with matrix indices in plotmath.
I'm plotting matrix elements: Z [i, i], and I'd like to put that as label.
2010 Nov 10
2
force apply not to drop the dimensions of FUN results ?
Dear R users,
Here is my problem:
I have an array with at least four dimensions:
> dim(myArray)
[1] 20 17 3 6
I'd like to apply a function to each occurrence of the matrix (3x6)
defined by the last two dimensions. This interpolation function always
return a matrix of the same dimensions as its argument:
> interpSecteurs.f(myArray[1, 1, , ])
secteur
rotation 1 2 3
2010 Nov 10
2
prcomp function
Hello,
I have a short question about the prcomp function. First I cite the
associated help page (help(prcomp)):
"Value:
...
SDEV the standard deviations of the principal components (i.e., the square
roots of the eigenvalues of the covariance/correlation matrix, though the
calculation is actually done with the singular values of the data matrix).
ROTATION the matrix of variable loadings
2010 Feb 28
1
dots for sample
Dear R-Developers,
could 'sample' gain a ... argument?
As a convenience function, I added a sample Method to my hyperSpec
class. This function however has a flag indicating whether the results
should be returned directly as a hyperSpec object or rather as indices
that give a random sample.
For the moment, I use SetGeneric to add the dots argument, but this of
course gives a warning
2011 Feb 18
6
sort a 3 dimensional array across third dimension ?
I'm attempting to sort a 3 dimensional array that looks like this
> x
, , 1
[,1] [,2]
[1,] 9 9
[2,] 7 9
, , 2
[,1] [,2]
[1,] 6 5
[2,] 4 6
, , 3
[,1] [,2]
[1,] 2 1
[2,] 3 2
Such that it ends up like this ....
> y
, , 1
[,1] [,2]
[1,] 2 1
[2,] 3 2
, , 2
[,1] [,2]
[1,] 6 5
[2,] 4 6
, , 3
[,1] [,2]
2010 Oct 28
2
R and Matlab
Dear Group,
I am looking for ways to use R and Matlab. Doing the data transformations in
R and using the data in Matlab to analyze with some pre-defined scripts.
Any good ways to transfer the data into matlab in its most recent version?
I tried using R.matlab but the writeMat output is not readable by Matlab.
I just need to output a data.frame and read it as is into matlab where I can
do any
2008 Dec 22
2
... (dotMethods) and cbind/rbind: how to give the signature?
Dear List,
I'm struggling with the signature writing cbind/rbind functions for a S4
class.
First of all, I'm very happy that it is now possible to dispatch on ...
I follow the example for "paste" in ?dotMethods, which works as far as this:
### start example
setClass ("cbtest",
representation = representation (data = "data.frame"),
2010 Aug 17
1
prompt () and backticks for default arguments
Dear all,
I just noticed, that prompt () looses backticks that protect default arguments:
f <- function (FUN = `*`) {}
cat (prompt (f, NA)$usage)
yields:
\usage{ f(FUN = *) } %- maybe also 'usage' for other objects documented here.
without the backticks, which is of course found by R CMD check as syntax error.
While this is easily fixed if the .Rd is further edited manually, I
2008 Dec 22
2
methods vs. functions
Dear List,
a second, more general, question concerning S4 classes.
I have a bunch of functions/methods for my class.
At the moment I have them as methods, because they work on objects of my S4
class and therefore "belong" to that class.
On the other hand, it is comparably unlikely that someone else wants the same
kind of method.
And package.skeleton () produces the
2008 Nov 03
1
Fourier Transform with irregularly spaced x
Dear all,
I work with (vibrational) spectra: some kind of intensity (I) over frequency
(nu), wavelength or the like.
I want to do fourier transform for interpolation, smoothing, etc.
My problem is that the spectra are often irregularly spaced in nu: the
difference between 2 neighbouring nu varies across the spectrum, and data
points may be missing.
Searching for discrete fourier transform
2011 Feb 17
2
amount of data R can handle in a single file
Dear Sir/Madam,
I would like to know what is the maximum number of observations a
single file must have when using R. I am asking this because am trying
to do research on banking transactions and i have around 49million
records. Can R handle this? Advise with regard to this.
Mark Nasila
Quantitative Analyst
CBS Risk Management
Personal Banking
7th Floor, 2 First Place,
Cnr
2010 Mar 12
2
Data frame question
Hi,
I have the following question about creating data frames. I want to
create a data frame with 2 components: a vector and a matrix.
Let me use a simple example:
y <- rnorm(10)
x <- matrix(rnorm(150), nrow=10)
Now if I do
dd <- data.frame(x=x, y=y)
I get a data frame with 16 colums, but if, according to the documentation,
I do
dd <- data.frame(x=I(x), y=y)
then str(dd)
2010 Aug 25
3
approxfun-problems (yleft and yright ignored)
Dear all,
I have run into a problem when running some code implemented in the
Bioconductor panp-package (applied to my own expression data), whereby gene
expression values of known true negative probesets (x) are interpolated onto
present/absent p-values (y) between 0 and 1 using the *approxfun -
function*{stats}; when I have used R version 2.8, everything had
worked fine,
however, after updating
2011 Feb 03
2
"Matrix' with Functions
Dear R members,
I have a quite large of function that are named like that
f11,f12,...f15
f21,f22,...f25
..
f51,f52,...f52
These are static (hard-coded) functions that the only common they have is that they take the same number and type of input fij(a,b,c,d). As you might understand this is really close to the notion of matrix only that my 'matrix' contains functions. It would be great if
2010 Nov 12
1
Xapply question
Dear list,
I'm stuck with looking for a function of the *apply family, which I suppose
exists already ? just I can't find it:
What I'm looking for is somewhere between sweep and mapply that does a
calculation vectorized over a matrix and a vector:
It should work complementary to sweep: for each row of the matrix, a different
value of the vector should be handed over.
Close to
2010 Oct 05
3
SweaveInput + keep.source = TRUE trouble
Dear all,
I have trouble with R-beta sweaving files that include definitions with
\SweaveInput in combination with keep.source = TRUE
Symptom:
SInput is taken from too far down the input file (the shift is the number of
lines of the included file). Is that known? Searching didn't turn up anything,
yet I think there are more people than just me using keep.source.
Example:
$
2010 Oct 12
1
need help with nnet
HI, Dear R community,
My data set has 2409 variables, the last one is response variable. I have
used the nnet after feature selection and works. But this time, I am using
nnet to fit a model without feature selection. I got the following error
information:
> dim(train)
[1] 1827 2409
nnet.fit<-nnet(as.factor(out) ~ ., data=train, size=3, rang=0.3,
decay=5e-4, maxit=500) # model
2010 Aug 19
5
Does anyone use Sweave (RweaveLatex) option "expand=FALSE"?
I am trying to improve the error reporting in Sweave documents, so that
if you have a syntax error in a code chunk, it will tell you which line
of your input file contained the error.
For example, currently you get this:
Error: chunk 1 (label=named)
Error in parse(text = chunk) : unexpected symbol in "x <- foo bar"
Execution halted
and I'd like errors to be more like this:
2008 Oct 10
1
Creating a new connection type
Hello. I have an instrument, actually a step motor indexer that I want to drive from R. It uses an RS-232 connection. I already have a few C subroutines that I access from R but I would like to be able use R's connection related functions - readLines, writeLines, cat, read.table, etc - directly. Does any one have any suggestions on how a I should proceed to create a new connection type? Is it
2008 Oct 31
2
Row and Column positions
Hi R,
m=data.frame(a=c(1,NA,5,5),b=c(4,5,6,7),c=c(NA,NA,NA,5))
I want to know the methods of getting row and column positions of NA in
the above dataframe. How do I do this?
Thanks, Shubha
This e-mail may contain confidential and/or privileged i...{{dropped:13}}