similar to: question about the "Y of R" article in the latest R news

Displaying 20 results from an estimated 7000 matches similar to: "question about the "Y of R" article in the latest R news"

2009 Jul 16
3
DataFrame help
Alright, so I am trying to write my own function to calculate column sums in a matrix. I want the result as a single list with the values. So far I have: csum<-function(m) { a = data.frame(m) s = lapply(a,sum) return(s) } What is the easiest way to have it return in a format such as [1] 6 15 24 ? Thanks. -- View this message in context:
1997 Dec 08
1
Samba - Amiga, smbclient recurs problem
Hi All, I'm an Amiga user of samba. All is well with server and client except recursive mput within smbclient. It transfers nothing, and reports no errors. Can anyone help? My samba version is 1.9.16p9. More detail: I started with BIN: pointing to amitcp:samba/bin in which I placed sh, as recommended. I found without recurs set that mput #? (or mput *) reported that it could not find ls
2009 Jul 27
4
dataframe to list conversion
Hi all, I have been experimenting with writing my own matrix column sum function. I want it to return a list. csum<-function(m) { a = data.frame(m) s = lapply(a,sum) return(s) } I wish to use the same code up until the return(s) that I have listed above. The problem is that s, I believe, is a data frame (looks like this:) $X1 [1] 148 $X2 [1] 156 $X3 [1] 164 $X4 [1] 172
2001 Dec 14
2
colSums in C
Hi, all! My project today is to write a speedy colSums(), which is a function available in S-Plus to add the columns of a matrix. Here are 4 ways to do it, with the time it took (elapsed, best of 3 trials) in both R and S-Plus: m <- matrix(1, 400, 40000) x1 <- apply(m, 2, sum) ## R=16.55 S=52.39 x2 <- as.vector(rep(1,nrow(m)) %*% m) ## R= 2.39 S= 8.52 x3 <-
2005 Apr 21
1
colSums and rowSums with arrays - different classes and dim ?
Hi, I'm using colSums and rowSums to sum the first dimensions of arrays. It works ok but the resulting object is different. See > a3d <- array(rnorm(120, mean=2), dim=c(20,6,1)) > dim(colSums(a3d)) [1] 6 1 > dim(rowSums(a3d)) NULL > class(colSums(a3d)) [1] "matrix" > class(rowSums(a3d)) [1] "numeric" I was expecting rowSums to preserve the array
2008 Nov 14
1
# values used in a function in tapply
Hello, I am using tapply to pull out data by the day of week and then perform functions (e.g. mean). I would like to have the number of values used for the calcuation for the functions, sorted by each day of week. A number of entries in any given column are NAs. I have tried the following code and simple variants with no luck. for (i in 1:length(a[1,])){ x<-tapply(a[,i],a[,1],mean,
2011 Jun 27
1
How to handle badblocks with btrfs?
Hi, I have some errors in dmesg: [ 542.255788] ata1.00: exception Emask 0x0 SAct 0xffffff SErr 0x0 action 0x0 [ 542.255797] ata1.00: irq_stat 0x40000008 [ 542.255805] ata1.00: failed command: READ FPDMA QUEUED [ 542.255821] ata1.00: cmd 60/00:00:1a:b7:7a/04:00:1d:00:00/40 tag 0 ncq 524288 in [ 542.255824] res 41/40:00:a0:b7:7a/00:00:1d:00:00/40 Emask 0x409 (media error) <F> [
2002 Jan 07
0
New package: colSums
I've uploaded a package colSums_1.0.tar.gz to CRAN /src/contrib/Devel. It contains functions colSums, colMeans, colVars, colStdevs, rowSums, rowMeans, rowVars, and rowStdevs. These do simple, fast arithmetic on columns/rows of a matrix, or more generally across dimensions of an array, e.g. colSums(m) = apply(m, 2, sum) but faster. They should be compatible with the corresponding S-Plus
2013 Jan 27
2
Loops
Dear Contributors, I am asking help on the way how to solve a problem related to loops for that I always get confused with. I would like to perform the following procedure in a compact way. Consider that p is a matrix composed of 100 rows and three columns. I need to calculate the sum over some rows of each column separately, as follows: fa1<-(colSums(p[1:25,])) fa2<-(colSums(p[26:50,]))
2010 Nov 28
4
how to divide each column in a matrix by its colSums?
Hi, I have a matrix, say m=matrix(c( 983,679,134, 383,416,84, 2892,2625,570 ),nrow=3 ) i can find its row/col sum by rowSums(m) colSums(m) How do I divide each row/column by its rowSum/colSums and still return in the matrix form? (i.e. the new rowSums/colSums =1) Thanks. Casper -- View this message in context:
2015 Sep 12
0
tinc generating invalid packet checksums?
On Thu, Sep 10, 2015 at 19:34:21 -0400, Nathan Stratton Treadway wrote: > It seems that when the cksum is incorrect, it is always off by 1. > [...] > Am I correct in concluding that this cksum problem is a bug in Tinc? After investigating this further, I'm fairly certain that problem originates in the following lines of the clamp_mss() function in route.c: [...] csum ^=
2005 Jun 26
0
Factor correlations in factanal
Dear R-devel list members, Ben Fairbank draw it to my attention that factanal() (in the stats package) doesn't report factor correlations for oblique rotations. Looking at the source, I see that factanal also doesn't save the factor-transformation (rotation) matrix from which these correlations can be computed. I've modified the source, attached below, so that the transformation
2001 Jul 18
1
colSums
As best I understand it, colSums (and associated functions) in S+ 6 are optimized functions (calling special C routines) for doing simple matrix math. For example, it seems like (in S+): all.equal(colSums(m), apply(m, 2, sum)) should be TRUE for any matrix m. It also seems like colSums (and its brethren) are very fast. My question: Are there equivalents to colSums in R? Thanks, Dave Kane
2007 Apr 26
1
R News, volume 7, issue 1 is now available --error in AMMI article
Hi, In this newsletter (Vol 7, 1),the article on AMMI by Onofri and Ciriofolo presented a AMMI function. One of arguments for this function AMMI (Page 17) is biplot. There is a biplot fucntion from {stats} package. I guess they are not the same. Could the authors clarify that? Thanks, Yuandan [[alternative HTML version deleted]]
2001 Jul 10
1
Citing an article from R News
The editorial in Volume 1/2 of R News requests that we cite articles in R News by using the ISSN 1609-3631 and the URL http://cran.R-project.org/doc/Rnews/. Could someone provide a sample BibTeX entry, say for Brian Ripley's article on "Installing R under Windows" from that issue? I am using the natbib package, if that matters. I would start with @Article{R:Ripley:2001, author
2017 Feb 07
1
Re: [PATCH v2 1/7] mllib: factorize code to add Checksum.get_checksum function
On Tue, Feb 07, 2017 at 04:14:16PM +0100, Cédric Bosdonnat wrote: > Getting checksum involves the same code than verifying them. Create > a get_checksum function and use it in verify_checksum. > --- > mllib/checksums.ml | 25 ++++++++++++++++--------- > mllib/checksums.mli | 9 +++++++++ > 2 files changed, 25 insertions(+), 9 deletions(-) > > diff --git
2009 Nov 30
2
command similar to colSums for rowSums?
Working with an NxMxO sized matrix, currently I can do this in my code: if (max(colSums(array)) >= number) But to get an equivalent result using rowSums, I have to do: for (i in 1:10) { if (max(rowSums(array[,,i])) >= number) } I'm running both in a much larger loop that loops millions of times, so speed and such is quite a big factor for me. Currently, the colSums line uses about
2005 Jun 08
1
New news sections for user article submissions on CentOS.org
We now have 3 new News Categories (on http://www.centos.org ) that allow article submissions by our registered users. They are: CentOS in the News - External News articles about CentOS. http://www.centos.org/modules/news/index.php?storytopic=9 Projects based on CentOS - Projects from other organizations that use CentOs as their base OS. If you are using CentOS as the base OS for your project, or
2017 Jan 03
0
[PATCH 2/5] mllib: factorize code to add Checksum.get_checksum function
Getting checksum involves the same code than verifying them. Create a get_checksum function and use it in verify_checksum. --- mllib/checksums.ml | 20 +++++++++----------- mllib/checksums.mli | 3 +++ 2 files changed, 12 insertions(+), 11 deletions(-) diff --git a/mllib/checksums.ml b/mllib/checksums.ml index dfa8c3ae7..3efc764b9 100644 --- a/mllib/checksums.ml +++ b/mllib/checksums.ml @@
2017 Feb 07
0
[PATCH v2 1/7] mllib: factorize code to add Checksum.get_checksum function
Getting checksum involves the same code than verifying them. Create a get_checksum function and use it in verify_checksum. --- mllib/checksums.ml | 25 ++++++++++++++++--------- mllib/checksums.mli | 9 +++++++++ 2 files changed, 25 insertions(+), 9 deletions(-) diff --git a/mllib/checksums.ml b/mllib/checksums.ml index 1009e131c..bee829085 100644 --- a/mllib/checksums.ml +++