similar to: Taking diff of character vectors

Displaying 20 results from an estimated 200 matches similar to: "Taking diff of character vectors"

2009 Sep 20
4
correlation help
Dear group, I have a matrix like the following: Name Sample1 sample2 sample3 sample4 ..... sample(n) nm1 10.5 13.5 30 31 nm2 8 11 34 29 nm3 9 10.3 27.8 35 nm(j) I want to be able to calculate correlation between all pairs of names. For example (nm1,nm2),
2011 Oct 17
1
plotting issues with PCA
Hi Listers, This has a simple answer but it has been eluding me nonetheless. I have been building a PCA plot from scratch with the ability to plot predefined groups in different colors. This has worked fine but when I try to get a polygon drawn around each of the groups it is not recognising my colour file correctly and is only printing the first colour in the file....code is below
2009 Mar 14
1
multiple hypothesis testing
Dear all, Myself Vijaykumar Muley working as senior research fellow. By training I am a computational biologist with not a strong knowledge of statistics. I have done some analysis which is explained as follows, I have 10340 (X) profiles of binary vectors with same length(N=845), I will call then "gene profiles" for example... v1 v2 v3 v4.....vN a 1 0 1 0 1 b 0
2007 Mar 09
1
lpSolve space problem in R 2.4.1 on Windows XP
Hi. I am trying to use the linear optimizer from package lpSolve in R 2.4.1 on Windows XP (Version 5.1). The problem I am trying to solve has 2843 variables (2841 integer, 2 continuous) and 8524 constraints, and I have 2 Gb of memory. After I load the input data into R, I have at most 1.5 Gb of memory available. If I start the lp with significantly less memory available (say 1 Gb), I get
2007 Jul 12
1
sub-function default arguments
Hi. I have defined a function, f1, that calls another function, f2. Inside f1 an intermediate variable called nm1 is created; it is a matrix. f2 takes a matrix argument, and I defined f2 (schematically) as follows: f2<-function(nmArg1=nm1,...){nC<-ncol(nmArg1); ... } so that it expects nm1 as the default value of its argument. f1 is defined (schematically) as:
2010 Oct 05
3
Question about assigning values in a matrix, conditional on column first row; how to do the loop.
Hello, I?m new at programming and I will greatly appreciate if you can help me with this. I have a very large matrix (hundreds of rows and columns), with the first raw filled with different numbers (between 0 and 1). The rest of the matrix is filled with values 0, 1, 2. What I need is to replace the values in the matrix (except the first row will has to remain intact). In each column I have to
2004 Dec 17
1
reshape and split
Dear R-users, I am trying to reshape the DF "dat2" in the "long" format, but can't figure out how to use the "split"-option: > dat2 a.1995.z b.1995.z a.1996.z var 1 100.00000 100.00000 100.00000 Neue Anlagen insgesamt 2 40.09904 23.60890 40.88960 Neue Ausr??stungen 3 59.90096 76.39110 59.11040 Neue Bauten This
2016 Dec 20
2
colnames for data.frame could be greatly improved
Hello, colnames seems to be not optimized well for data.frame. It escapes processing for data.frame in if (is.data.frame(x) && do.NULL) return(names(x)) but only when do.NULL true. This makes huge difference when do.NULL false. Minimal edit to `colnames`: if (is.data.frame(x)) { nm <- names(x) if (do.NULL || !is.null(nm)) return(nm) else
2012 Feb 29
1
Error occurred during mean calculation of a column of a data frame, which is apparently contents numeric data
Hello R people, How can I compute the mean of the "Pulse_rate" column of the data frame or matrix from the following character object called "str_got". It has 14 entries and each entry has 8 values, separated by commas. Please go thru the following R commands to know how I tried to unstring and unlist the values to form a data frame. > str_got [1]
2010 Sep 15
1
Changing variable class problems
I'm reading in some data from a csv file, and it's reading in some of the columns as character variables instead of numeric. I know I can fix this by doing as.numeric for each of the columns, but the problem is I have a LOT of different quantitative variables that I would have to do this for. I've been trying something along the following but it hasn't really been working
2012 Jul 12
1
apply() to a function that has more than 2 arguments
Dear all, I created a function which it has many arguments i.e. Mu(x, Y, B, X, P) where Mu is the function. This function works perfect but when I am trying to use it in the apply() function in the manner apply(Matr, 1, Mu, Y=y, B=b, X=x, P=p) it does not work and the output is: Error in match.fun(FUN) : '1' is not a function, character or symbol When I transform the function Mu to have
2002 Nov 15
2
Why no colSDs etc
Hi people, If there is a fn "colMeans" why isn't there a "colSDs" etc Thanks, Phil. -- Philip Rhoades Pricom Pty Limited (ACN 003 252 275) GPO Box 3411 Sydney NSW 2001 Australia Mobile: +61:0411-185-652 Fax: +61:2:8923-5363 E-mail: pri at chu.com.au -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read
2007 Feb 28
2
delete selecting rows and columns
Hi, I'm working with a big square matrix (15k x 15k) and I have some trouble. I want to delete selecting rows and columns. I'm using something like this: > sel_r=c(15,34,384,985,4302,6213) > sel_c=c(3,151,324,3384,7985,14302) > matrix=matrix[-sel_r,-sel_c] but it works very slow. Does anybody know how to make it in faster way? Thank's -- View this message in context:
2007 Jul 29
2
Prompt comes too late
Hi R fans I am trying to make a program to ask the user to choose data file: print("Choose data file please !") matr=read.table(file.choose(),dec=".",header=TRUE) The problem is that the prompt Choose data file please ! comes after I have chosen the file. What am doing wrong? Thanks in advance Ralf Finne
2002 Aug 14
3
t-test via matrix operations
I need to calculate a large number of t statistics, and would like to do so via matrix operations. So far I have figured out a way to calculate the mean of each row of the matrix: d <- matrix(runif(100000,1,10), 1000, 10) # some test data s <- rep(1,ncol(d)) # a sum vector to use for matrix multiplication means <- (d%*%s)/ncol(d) This is at least 1 order of magnitude faster than
2009 Jun 26
1
gradient fill of a grid.polygon
Dear list, Following a recent enquiry, I've been playing with the idea of creating a colour gradient for a polygon, using the Grid package. The idea is to draw a number of stripes of different colours, using the grid.clip function. Below is my current attempt at this, library(grid) rotate.polygon <- function(g, angle=0){ # utility function, works fine matR <- matrix(c(cos(angle),
2006 Mar 31
2
rowVars
I am using the R 2.2.1 in a Windows XP environment. I have a dataframe with 12 columns and 1,000 rows. (Some of the rows have 1 or fewer values.) I am trying to use rowVars to calculate the variance of each row. I am getting the following message: ?Error in na.remove.default(x) : length of 'dimnames' [1] not equal to array extent? Is there a good work-around?
2011 Apr 27
3
Kolmogorov-Smirnov test
Hi, I have a problem with Kolmogorov-Smirnov test fit. I try fit distribution to my data. Actualy I create two test: - # First Kolmogorov-Smirnov Tests fit - # Second Kolmogorov-Smirnov Tests fit see below. This two test return difrent result and i don't know which is properly. Which result is properly? The first test return lower D = 0.0234 and lower p-value = 0.00304. The lower 'D'
2016 Jan 22
2
Notification of file modification in subdirectories not working
On Thu, Jan 21, 2016 at 04:57:34AM -0800, ivenhov wrote: > Hi > > Does anyone had similar issues in the past? > I still cannot find reason why notification of file modification of files in > subdirs is not visible on client machines Someone needs to send network traces and debug level 10 logs for this. And try to reproduce the same against a Windows server. Volker -- SerNet
2002 Mar 17
5
compute variance of every column in a matrix without a loop
Is it possible to compute the variance of every column in a matrix without a loop? -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch