Displaying 20 results from an estimated 40000 matches similar to: "Matrix Column Names"
2010 May 22
2
Fast Matrix Computation
Hi,
I have two (large) matrices A and B of dimensions (m,n) and (p,n) respectively.
I'd like to see if the is a fast way to compute a new matrix C with
dimension (m*p,n) in which each row in C is found by applying some
function f to each pair of rows (x,y) where x is a row in A and y is a
row in B.
For example, if
A <- matrix(c(1, 2, 3, 4, 5, 6), byrow=TRUE, ncol=3)
B <- matrix(c(7,
2010 Feb 06
4
Sorting
Hi,
I have a list of vectors (of varying lengths). I'd like to sort this
list by applying a function to each pair of vectors in the list and
returning information to sorting routine that let's it know which one
is larger.
To solve problems like this in Common Lisp, the sort function accepts
a function as an argument. The arguments to this function are two
elements of the list which is
2011 Mar 12
1
Column order in stacking/unstacking
Dear R users,
I'm having some problems with the stack() and unstack() functions, and
wondered if you could help.
I have a large data frame (400 rows x 2000 columns), which I need to reduce
to a single column of values (and therefore 800000 rows), so that I can use
it in other operations (e.g., generating predictions from a GLM object).
However, the problem I'm having can be reproduced
2007 Nov 24
2
unexpected result from reshape
Hi all.
I have unexpected reshape results on datasets with certain variable
names. Here a reproducible example:
d <- matrix(seq_len(7*7), 1, 7*7)
vnames <- c('acc','ppeGross','CF','ROA','DeltaSales','invTA','DeltaRevDeltaRec')
varying <- unlist(lapply(vnames, paste, 1:7, sep='.'))
d <- data.frame(d)
names(d) <- varying
2002 Nov 16
1
using the function "expression" with "paste" in a plot
Hi,
I noticed that paste and expression in the following manner does not produce
the desired result.
vnames=c("pi","y","delta")
vx=vn=3
m=16
# mydata any matrix that takes for the following form
mydata=array(somedata,c(m,vn,vx))
# producing plots
for (j in 1:vx){
for (i in 1:vn)
{
plot(mydata, type="l", main=expression(paste("Effect of",
2012 Dec 11
1
Rprof causing R to crash
I'm trying to use Rprof() to identify bottlenecks and speed up a particullary
slow section of code which reads in a portion of a tif file and compares
each of the values to values of predictors used for model fitting. I've
written up an example that anyone can run. Generally temp would be a
section of a tif read into a data.frame and used later for other processing.
The first portion
2010 Nov 15
2
rotate column names in large matrix
Dear List,
I have a large (1600*1600) matrix generated with symnum, that I am using to
eyeball the structure of a dataset.
I have abbreviated the column names with the abbr.colnames option. One way
to get an even more compact view of the matrix would be to display the
column names rotated by 90 degrees.
Any pointers on how to do this would be most useful. Any other tips for
displaying the
2003 Apr 03
1
Tukey's one degree of freedom for nonadditivity?
Is there code available to decompose interactions involving at least
one nominal factor with more than 2 levels as described, e.g., by Tukey
or by Mandel (1971, Technometrics, 13: 1-18)?
Tukey's model:
E(y[i,j]) = mu0 + a[i] + b[j] + c*a[i]*b[j],
estimating a, b, and c so sum(a) = sum(b)= 0. Mandel essentially
describes a singular value decomposition of the interaction.
Thanks,
2010 Jun 30
1
vlmc - "In vlmc(traffic.clusters.stationary, cutoff = i) : alphabet with >1-letter strings; trying to abbreviate"
Dear all (copying the package author),
I have a question on the vlmc package. I am trying to model a time series, where each element can take one of 11 values (the result of some clustering). When I run the following command (synthetic data to facilitate self-contained example) I get the following warning: ("alphabet with >1-letter strings; trying to abbreviate")
+++ START+++
>
2005 Feb 15
1
Trellis barchart, column display order issue
I have searched the archives and instructions high and low but have not
found what I need.
I have a dataframe named Data with columns:
AdjResND0 - the numeric result
Parameter - the classification (chemical name)
Sort - the order I want the chemical names to appear, with leading zeros
so all are the same length
Client.Name - the sample name
I am trying to generate a series of 1 page barcharts,
2011 Feb 17
1
cv.glmnet errors
Hi,
I am trying to do multinomial regression using the glmnet package, but the
following gives me an error (for no reason apparent to me):
library(glmnet)
cv.glmnet(x=matrix(c(1,2,3,4,5,6,1,2,3,4,5,6),
nrow=6),y=as.factor(c(1,2,1,2,3,3)),family='multinomial',alpha=0.5,
nfolds=2)
The error i get is:
Error in if (outlist$msg != "Unknown error") return(outlist) :
argument is of
2008 Oct 31
1
set the language
Un texte encapsul? et encod? dans un jeu de caract?res inconnu a ?t? nettoy?...
Nom : non disponible
URL : <https://stat.ethz.ch/pipermail/r-help/attachments/20081031/1dad1061/attachment.pl>
2002 Dec 12
16
ScanMail Message: To Recipient virus found or matched file blocki ng setting.
ScanMail for Microsoft Exchange has taken action on the message, please
refer to the contents of this message for further details.
Sender = saulo@capebe.org.br
Recipient(s) = samba@samba.org;
Subject = [Samba] Samba HP-UX 10.20
Scanning Time = 12/12/2002 17:54:32
Engine/Pattern = 6.150-1001/410
Action on message:
The attachment CPD_ CAPEBE.vcf matched file blocking settings. ScanMail has
taken
2009 Feb 11
2
sorting a matrix by the column
this is a bad question but I can't figure it out and i've tried. if i
sort the 2 column
matrix , temp1, by the first column, then things work as expected. But,
if I sort the 1 column matrix, temp2, then it gets turned coerced to a
vector. I realize that I
need to use drop=FALSE but i've put it in a few different places with no
success. Thanks.
temp1 <-
2003 May 21
1
Code Help
I am trying to analyse some data and was given R code to do this with but
there seem to be errors in the code. My level of knowledge is improving but
still limited.
The details are;
Data on clover lines; Lines.txt attached. Comma seperations
Code:
options(digits=3)
clover <- read.table("Lines.txt",header=T,sep=",")
vnames <- names(clover);nv <- length(vnames)
2011 Dec 20
1
column permutation of sparse matrix
Hi,
I'm very new to working with sparse matrices and would like to know how I
can column permute a sparse matrix. Here is a small example:
> M1 <-
> spMatrix(nrow=5,ncol=6,i=sample(5,15,replace=TRUE),j=sample(6,15,replace=TRUE),x=round_any(rnorm(15,2),0.001))
> M1
5 x 6 sparse Matrix of class "dgTMatrix"
[1,] 2.983 . 1.656 5.003 . .
[2,] .
2012 Jul 19
2
Boxplot names
When i make Boxplots with a lot of boxes, the names of them get only written down every second "column".
Since they aren't in any way ordered, you don't see anymore to what they belong.
example:
l<-rep(list(1:5),20); boxplot(l,names=sample(20,1:20))
Is there a way to show them all, or do i have to split the plots?
[[alternative HTML version deleted]]
2012 Nov 15
1
bug with mapply() on an S4 object
Hi,
Starting with ordinary vectors, so we know what to expect:
> mapply(function(x, y) {x * y}, 101:106, rep(1:3, 2))
[1] 101 204 309 104 210 318
> mapply(function(x, y) {x * y}, 101:106, 1:3)
[1] 101 204 309 104 210 318
Now with an S4 object:
setClass("A", representation(aa="integer"))
a <- new("A", aa=101:106)
> length(a)
2011 Feb 16
2
how to create normalized pdf plot?
Hello,
I have multiple data files. Each file contains a single column and 1.5
million rows. I want to create normalized pdfs (area under curve is 1) and
histograms to compare with one another. Could anybody suggest if there
exists an easy way or built in function in R.
At present I am using Origin and Excel together to do this. A single file
needs 10 minutes and I have a total of 929 files! So
2003 Feb 28
1
summary.glm() print problem(?) with cor = TRUE
Hi,
I've had a look the bug list and searched though the R documentation, email
lists etc. but didn't see anything on this:
when I do:
summary(species.glm1, correlation = TRUE)
I get a correlation matrix like this:
Correlation of Coefficients:
( p I(H C
pH * 1
I(pH^2) * B 1
Ca . . 1
I(Ca^2) . . B
attr(,"legend")
[1] 0 ` ' 0.3 `.'