similar to: coercing a list into matrix

Displaying 20 results from an estimated 2000 matches similar to: "coercing a list into matrix"

2007 Nov 23
4
help pleaseeeeeeeee
Dears Sirs During my computational work I encountered unexpected behavior when calling "ar" function, namely # time series x<-ts(c(-0.2052083,-0.3764986,-0.3762448,0.3740089,0.2737568,2.8235722,- 1.7783313,0.2728676,-0.3273164),start=c(1978,3),frequency=4,end=c(1980,3)) # ar function res.ar<-ar(x,aic=TRUE,demean=F) # call "ar" again and ............
2009 Jan 20
5
Problem with subset() function?
Hi all, Can anyone explain why the following use of the subset() function produces a different outcome than the use of the "[" extractor? The subset() function as used in density(subset(mydf, ht >= 150.0 & wt <= 150.0, select = c(age))) appears to me from documentation to be equivalent to density(mydf[mydf$ht >= 150.0 & mydf$wt <= 150.0, "age"])
2007 Aug 03
4
FW: Selecting undefined column of a data frame (was [BioC] read.phenoData vs read.AnnotatedDataFrame)
Hi all, What are current methods people use in R to identify mis-spelled column names when selecting columns from a data frame? Alice Johnson recently tackled this issue (see [BioC] posting below). Due to a mis-spelled column name ("FileName" instead of "Filename") which produced no warning, Alice spent a fair amount of time tracking down this bug. With my fumbling fingers
2009 Apr 29
1
Corrupt data frame construction - bug?
Hi useRs, A recent coding infelicity along these lines yielded a corrupt data frame. foo <- matrix(1:12, nrow = 3) bar <- data.frame(foo) bar$NewCol <- foo[foo[, 1] == 4, 4] bar lapply(bar, length) > foo <- matrix(1:12, nrow = 3) > bar <- data.frame(foo) > bar$NewCol <- foo[foo[, 1] == 4, 4] > bar X1 X2 X3 X4 NewCol 1 1 4 7 10 <NA> 2 2 5 8 11
2009 Aug 11
3
loadings function (PR#13886)
Full_Name: Mike Ulrich Version: 2.9 OS: Mac OSX Submission from: (NULL) (69.169.178.34) The help documentation for loadings() lists more then one parameter. The function call only expects one parameter. The digits, cutoff, and sort parameters are not used in the function. ## S3 method for class 'loadings': print(x, digits = 3, cutoff = 0.1, sort = FALSE, ...) ## S3 method for class
2009 Mar 17
3
Combining columns from two dataframes
I all I am trying to combine columns from two dataframes to make a completely new dataframe consisting of one column of dates (ie a combination of dates from the two dataframes). >From the following dataframes a b 1 2008-07-27 1 2 2008-10-01 2 3 2008-08-15 3 4 2008-08-14 4 5 2008-08-14 5 6 2008-09-20 6 c d 1 2008-07-27 1 2 2008-10-01 2 I would like to get: z
2009 Jan 22
2
Is it possible for R to import a SigmaPlot file?
I recently received a Sigmaplot file (*.jnb) from a customer and would like to know if I can input it to a data frame and then manipulate the data in R.    I did a search on Google and on RSeek (www.rseek.org), but did not get any good hits.  Thank for any feedback and insight you can provide.   P.S. Love the flexibility of R and would love to keep using it.   Just wanting to know if this is
2009 Mar 18
2
How do I set the Windows temporary directory in R?
I'm trying to redirect where temporary files go under R to D:\temp\somerandomname from its default (C:\Documents and Settings\username\Temp\somerandomname) -- how do I go about doing this? --j -- Jonathan A. Greenberg, PhD Postdoctoral Scholar Center for Spatial Technologies and Remote Sensing (CSTARS) University of California, Davis One Shields Avenue The Barn, Room 250N Davis, CA 95616
2008 Nov 28
2
AIC function and Step function
I would like to figure out the equations for calculating "AIC" in both "step() function" and "AIC () function". They are different. Then I just type "step" in the R console, and found the "AIC" used in "step() function" is "extractAIC". I went to the R help, and found: "The criterion used is AIC = - 2*log L + k *
2012 Jan 18
1
png cairo device problems on Mac 10.6.8
Hi all, I have been having problems generating png files on a Mac running OS X 10.6.8. Here's a simple example > png("foo.png", type = "cairo"); plot(1:10); dev.off(); null device 1 libpng warning: Application built with libpng-1.2.26 but running with 1.5.2 The resultant file is of size 0 Kb. Is this the proper place to report this issue? Or should
2007 Dec 28
1
two plots on the same page
I'd like to know why I cannot get a plot and the QQnorm in the same sheet. The commands are simple but: library(nlme) glmod1 <- gls(upfmla,correlation=corAR1(),method="ML") summary(glmod1) par(mfrow = c(2,1)) plot(glmod1, main="GLS Residuals vs. GLS Fitted") qqnorm(glmod1) No matter what (I tried different permutations of the plotting commands) the second drawing
2009 Mar 30
1
what is R equivalent of Fortran DOUBLE PRECISION ?
I noticed taht R cannot understand certain Fortran real constant formats. For instance: c14 <- as.double( 7.785205408500864D-02) Error: unexpected symbol in " c14 <- as.double( 7.785205408500864D" The above "D" is used in Fortran language to indicate the memory starage mode. That is for instructing Fortran compiler to store such a REAL constant in DOUBLE
2008 Nov 18
2
lmer p-values for fixed effects missing
I am trying to replicate the repeated measures example from Dr.Faraway's book (Extending the linear model with R) as follows: data(vision) vision$npower <- rep(1:4,14) mmod <-lmer(acuity~power+(1|subject)+(1|subject:eye),vision) When I look at the fixed effects p-value, it is missing. Am I missing something here? Thanks. Fixed effects: Estimate Std. Error t value
2007 Aug 07
2
Embedded nuls in strings
Hi, ?rawToChar 'rawToChar' converts raw bytes either to a single character string or a character vector of single bytes. (Note that a single character string could contain embedded nuls.) Allowing embedded nuls in a string might be an interesting experiment but it seems to cause some troubles to most of the string manipulation functions. A string with an embedded 0:
2009 Nov 06
2
Adjusting Yaxis (ylim) limits on a plotMeans(DV, IV1, IV2, error.bars="se")
Hello everyone, I have tried to look for this everywhere and so far have no luck. I have a plotMeans(DV, IV1, IV2, error.bars="se") graph that plots my data (DV-continuous, IVs are factors, IV1 - two levels, IV2-four levels). I am trying to increase a scale of my y-axis (to be consistent with my other graphs), but unfortunately nothing works with "plotMeans" function, which
2009 Mar 25
2
linking environments
Dear R-helpers, I try to use nested R-functions as follows: help1 = function(){ x = 1 help2() } with help2 = function(){ if (x == 1) cat("Hello world x = 1") } If I compile these functions and run help1() an error message occurs Fehler in help2() : objekt "x" nicht gefunden in english "error in help2(): object
2009 Nov 25
1
help writing for loop
Hi, I?d like to ask for some help in writing a loop. My situation is the following: I have a matrix (matrix.A) containing 3 columns and 100 rows. The columns represent parameter estimates a, b, and c. The rows contain different values for these parameter estimates. Each row is unique. I want to insert these parameter estimates into a model (say, y = a + bx + cx^2) and solve for y given a
2009 Aug 05
2
Wishlist: Navigate to "Index" page of help when no topic (PR#13872)
On 04/08/2009 7:33 PM, Steven McKinney wrote: >> -----Original Message----- >> From: Duncan Murdoch [mailto:murdoch at stats.uwo.ca] >> Sent: Tuesday, August 04, 2009 8:03 AM >> To: Steven McKinney >> Cc: r-devel at stat.math.ethz.ch; R-bugs at r-project.org >> Subject: Re: [Rd] Wishlist: Navigate to "Index" page of help when no >> topic
2009 Jul 28
1
Wishlist: Navigate to "Index" page of help when no topic specified (PR#13860)
Hi all, When I install a new package, and don't yet know any function names, I have to play the "poor man's game" to get to the standard help system "Index" page for the package: Poor Man's Game -=20 Load new package;=20 issue search() command; find position (say N) of loaded package;=20 issue objects(pos =3D N) command; get name of a random function (san
2009 Jan 07
2
Memory Efficiency of Symmetric Matrix
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 I'm generating a symmetric correlation matrix using a data matrix as input: mat <- cor(data.mat) My question is: Is there a more memory efficient way to store this data? For instance, since: all(mat == t(mat)) every value is duplicated, and I should be able to almost half the memory usage for large matrices. Any thoughts/comments? Cheers,