similar to: Howto sort dataframe columns by colMeans

Displaying 20 results from an estimated 2000 matches similar to: "Howto sort dataframe columns by colMeans"

2005 Apr 01
2
Error in colMeans ... what's wrong with my data?
Having searched and searched I still haven't found what's the problem with my data (I've attached the relevant file). Every time I tried to use the CANCOR-Function I got error messages. So I turned to check my two sets of variables separately by using the "colMeans"-Function. With one set no problem .. but with the other. My input : > struktur <-
2008 Mar 27
2
colMeans in a data.frame with numeric and character data
Hi all, I would like to know if it is posible by, someway, to get colMeans from a data.frame with numeric as well as character data, dispersed all over the object. Note that I would like to get colMeans neglecting character data. I am really in need of some function proceeding in that way… All the best Diogo André Alagador [[alternative HTML version deleted]]
2012 Dec 24
2
colmeans not working
[text file is also attached in case you find the format of email difficult to understand] Dear useRs,You must all the planning for the christmas, but i am stucked in my office on the following issue i had a file containg information about station name, year, month, day, and discharge information. i opened it by using following command > dat1<-read.table("EL.csv",header=TRUE,
2005 Jan 11
1
Please use colMeans()! was: Re: Calculate Mean of Column Vectors?
There are indeed speed advantages in using colSums etc. However the disadvantage is that the newbie doesn't always find the power inherent in the apply, sapply, tapply and mapply. For many things that I do, the speed is the least of my worries; although I take the point that using apply for means or sums in packages that are distibuted to others is not the way to go. As many of us have found
2010 Jun 01
2
Problem using apply
Hello , I can not get apply function to do what I want when doing stuff on rows. Let's say I want to divide the rows of matrix by their mean, the below show you get the same result weather you use 1 or 2, i.e. same result for columns than for means..:( Thanks a lot for the help, m = matrix( c(1,4,7,4,5,8,7,8,9), nrow = 3 ) divideByMean = function( v ){ return(
2009 Dec 16
2
Flexclust barchart issue when mcol=NULL (PR#14150)
Full_Name: Chris Hane Version: 2.10.1 OS: Windows Submission from: (NULL) (198.203.181.181) When using barchart in the flexcust package, setting mcol=NULL to avoid the lollipops causes an error. Each panel shows the text message "Error using packet n replacement has length zero." where n is the panel number. > data(iris) > cl <- cclust(iris[,-5], k=3) > barplot(cl,
2011 Mar 28
0
Bootstrapping the colMeans statistic
I have a fair bit of experience with S-Plus and have been asked to port some of my S-Plus bootstrapping functions to R, to which I am relatively new, Needless to say, I've run into some problems. In particular, I need to perform bootstrap resampling of the colMeans function using a moving blocks bootstrap, where the blocks are row indices. It's easy to build a function that allows me
2007 Dec 08
2
NAMESPACE choices for exporting S4 methods
We are building a package, and want to create S4 methods for both head and mean for our own BigMatrix class. Following the recommendation in "Writing R Extensions" we use exportMethods instead of export in NAMESPACE (this is described as being "clearer"). This works for head, but not for mean. Obviously we importFrom(utils, head), but don't need to do this for mean,
2009 Sep 28
1
colMeans()
Hello, I use the function rowMeans(x,na.rm=T). The result is the mean of valid values in each row, with NA removed. A for me very important information is, from how many valid "n" this mean has computed. The thing is, that I apply this function on many millions of rows, so the time it takes is multiplied by this factor! (so getting this with "rowSums(is.na(x))" it takes
2001 Feb 19
1
means by column after split
Colleagues ---------------------------------- System info: R version rw1020 on NT ESS using emacs ver. 20.4 ---------------------------------- I need to get the means for each column of a dataframe in the list created by splitting a data frame. At present, I am getting the mean of all columns in aggregate. The structure of the unsplit data is: > shuttle.tr1[1:10,] juliandate
2004 Mar 04
3
Why does a W2K (pro) client do more than it is asked to do?
Desperate to find out why connecting to a samba share(on an AIX server) from W2K is so slow, I tried connecting to the same share from a Linux box, using smbclient: smbclient \\\\aixserver\\sharedir$ -U lynn The results were amazing. The connection was so MUCH FASTER then connecting from a W2K (pro) workstation: \\aixserver\sharedir$ (in the Start|Run edit box) When I examined the samba log
2008 Mar 16
1
stats/debugging question hotelling t-sq
Hi I spent hours looking over my formula. Somehow I cant find the reason why it gives me different answer. help appreciated. x = as.matrix(read.table("http://www.niehs.nih.gov/research/atniehs/core/microarrays/docs/heinloth.txt",1)) x = t(x) #now rows are subjects, cols are genes x = x[order(rownames(x)),] #order by treatment group oxygen, ultra-violet, gamma radiation y =
2007 Aug 07
3
saving output
I have a question about how to save the output of a logistic regression model in some format (delimited, preferably) so that I can manipulate it to make nice tables in excel. I have tried print, save, write, none seem to do what I want them to. Does anyone have any ideas? Lynn D. Disney, Ph.D., J.D., M.P.H. Research Analyst SEIU 1199 1771 E. 30th Street Cleveland, Ohio 44114 Telephone:
2009 Mar 31
7
[Cucumber] Running single feature from command line
I am using Cucumber 0.2.3 and am having problems running a single feature. In particular, the cucumber Textmate bundle was not working so I traced it back and discovered that I could not run single files or features from the command line either. My setup has the following line in cucumber.yml default: -r features/support/env.rb -r features/support/plain.rb -r features/steps
2005 Apr 10
3
Re: whitelisting one IP in blacklisted netblock
Robin Lynn Frank wrote: > I have an entire /8 blacklisted. The problem is there is a single IP in > it I want to exempt from this. Searching the web site, I note there > used to be (circa version 1.3) a whitelist feature, but I couldn''t find > a simple solution to what I want to do. > > What would be the bes/easiest way to accomplish this? I can''t think of a
2002 May 21
1
Automating Joining a Domain
Hello everyone, Is there an easy way to automate the process of joining a Samba domain? Keith Lynn Systems Administrator School of Computer and Information Sciences University of South Alabama Mobile, AL 36608 Phone: (251) 460-6390 Fax: (251) 460-7274 Alternate E-mail: lynn@gateway.cis.usouthal.edu URL: http://www.cis.usouthal.edu/~lynn/
2008 Feb 08
3
Loading Data to R
This is the most basic question ever...I haven't used R in a couple years since college so I forget and haven't been able to find what I'm looking for in any of the manuals. I just need to figure out how to load a dataset into the program from excel! Thanks! CL [[alternative HTML version deleted]]
2007 Aug 01
5
Hardware that can ring my phone?
Hello, I am a small business owner in need for a solution that automatically answers an incoming call, prompts the caller via touch-tone menu ("press 1 to leave a message, press 0 to speak to a representative") and will ring my (real) phone ONLY if requested by caller. I know that Asterisk is capable of all the logic behind what I described above. However, I couldn't find a
2018 May 16
2
Bilateral matrix
xtabs does this automatically if your cross classifying variables are factors with levels all the cities (sorted, if you like): > x <- sample(letters[1:5],8, rep=TRUE) > y <- sample(letters[1:5],8,rep=TRUE) > xtabs(~ x + y) y x c d e a 1 0 0 b 0 0 1 c 1 0 0 d 1 1 1 e 1 1 0 > lvls <- sort(union(x,y)) > x <- factor(x, levels = lvls) > y <-
2009 Jun 02
2
bigmemory - extracting submatrix from big.matrix object
I am using the library(bigmemory) to handle large datasets, say 1 GB, and facing following problems. Any hints from anybody can be helpful. _Problem-1: _ I am using "read.big.matrix" function to create a filebacked big matrix of my data and get the following warning: > x = read.big.matrix("/home/utkarsh.s/data.csv",header=T,type="double",shared=T,backingfile