similar to: Altering columns

Displaying 20 results from an estimated 30000 matches similar to: "Altering columns"

2009 Sep 11
2
Searching 1st number within a ch. string
Hi all, Is there any process to conduct a search for a particular digit or letter in a ch. string? For example I want to make a search where 1st numeric figure appears in the string "asd123". Here the answer should be "4" Thanks, -- View this message in context: http://www.nabble.com/Searching-1st-number-within-a-ch.-string-tp25400580p25400580.html Sent from the R help
2008 Dec 30
5
Downloading data from Economagic
I was trying to dw data from Economagic [http://www.economagic.com/em-cgi/data.exe/libor/day-ussnon], using following code : library(fimport) dat2 = economagicSeries("libor/day-ussnon", frequency = "daily") Here I see that data is not complete, downloaded data starts from "2007-12-31 ", whereas actual data is available from 2001. secondly, how I convert that data
2008 Dec 02
3
How to solve following equation?
I need to solve a equation like this : a = b/(1+x) + c/(1+x)^2 + d/(1+x)^3 where a,b,c,d are known constant. Is there any R-way to do that? Thanks in advance -- View this message in context: http://www.nabble.com/How-to-solve-following-equation--tp20785063p20785063.html Sent from the R help mailing list archive at Nabble.com.
2009 Jul 18
7
Question on qplot
Hi, suppose I have following codes : library(zoo); library(ggplot2) dat <- matrix(rnorm(500*2), 500); dat <- zooreg(dat, start = as.Date("01/01/01", "%m/%d/%y"), frequency=1); plot(dat) head(dat); month.no <- format(index(dat), "%m"); dat1 <- cbind(coredata(dat), as.numeric(month.no)) x <- dat1[,1]; y <- dat1[,2]; z <- dat1[,3] Now I draw a
2008 Dec 16
6
Sorting a date vector
I have a date-like-vector like : > date_file "10-02-2008" "10-03-2008" "10-06-2008" "10-07-2008" "10-09-2008" "10-10-2008" "10-13-2008" "10-14-2008" "10-15-2008" "10-16-2008" "10-17-2008" "10-20-2008" "10-21-2008" "10-22-2008" "10-23-2008"
2009 Jan 11
4
How to get solution of following polynomial?
Hi, I want find all roots for the following polynomial : a <- c(-0.07, 0.17); b <- c(1, -4); cc <- matrix(c(0.24, 0.00, -0.08, -0.31), 2); d <- matrix(c(0, 0, -0.13, -0.37), 2); e <- matrix(c(0.2, 0, -0.06, -0.34), 2) A1 <- diag(2) + a %*% t(b) + cc; A2 <- -cc + d; A3 <- -d + e; A4 <- -e fn <- function(z) { y <- diag(2) - A1*z - A2*z^2 - A3*z^3 - A4*z^4
2009 May 11
3
Searching within a ch. string
Hi all, is there any function to find some words in a character-string? For example suppose the string is : "gdfsa-sdhchc-88", now I want to find whether this string contains "sdhch". Is there any R function to do that? Regards, -- View this message in context: http://www.nabble.com/Searching-within-a-ch.-string-tp23484010p23484010.html Sent from the R help mailing list
2008 Nov 05
2
How to extract following data
Hi everyone, I have this kind of raw dataset : - <Temp diffgr:id="Temp14" msdata:rowOrder="13"> <Date>2005-01-17T00:00:00+05:30</Date> <SecurityID>10149</SecurityID> <PriceClose>1288.40002</PriceClose> </Temp> - <Temp diffgr:id="Temp15" msdata:rowOrder="14">
2009 Nov 16
2
How to make all elements all elements lower-cap ?
I have a vector of letters like c("a", "B", "c"). Is there any R function to force all elements to lower-cap ? Thanks, -- View this message in context: http://old.nabble.com/How-to-make-all-elements-all-elements-lower-cap---tp26365794p26365794.html Sent from the R help mailing list archive at Nabble.com.
2011 Jan 11
1
how to coerce part of each column of a matrix to a vector and merge them
Hello Suppose I have a matrix mat=(1:16,2) [,1] [,2] [,3] [,4] [1,] 1 5 9 13 [2,] 2 6 10 14 [3,] 3 7 11 15 [4,] 4 8 12 16 there is a vector end=c(2,3,1,3) #coerce the 1st 2 numbers of the 1st column to a vector [1] 1 2 #coerce the 1st 3 numbers of the 2nd column and append it to the previous vector [1] 1 2 5 6 7 #coerce the 1st number of
2007 Jul 15
3
rejected form not handled
Hello, I have a login form on /login.php which POSTs to /dorf1.php when access is granted and to /login.php when it is denied. require ''rubygems'' require ''mechanize'' agent = WWW:Mechanize.new() login = agent.get("http://server/login.php") form = login.forms.action("dorf1.php") form.fields[2].value = "wronguser" # login
2008 Jun 29
3
Interactive plot
Hi all, I have created following codes : mat = cbind(c(0.000059710430,0.000023057380), c(0.000023057380, 0.00005971089)) set.seed = 1000 vary = runif(dim(mat)[1], 2000, 3000) calc = function(mat, vary) { result = vector(length = (length(vary)+1)) result[1] = sqrt(t(vary) %*% vary) for (i in 1 : length(vary)) { result[(i+1)] = sum(vary)*sum(vary*mat[,i])
2008 Oct 31
4
[ifelse] how to maintain a value from original matrix without probs?
Dear all, I have a matrix with positive and negative values. >From this I would like to produce 2 matrices: 1st - retaining positives and putting NA in other positions 2nd - retaining negatives and putting NA in other positions and then apply rowMeans for both. I am trying to use the function ifelse in the exemplified form: ifelse(A>0,A,NA) but by putting A as a 2nd parameter it
2013 Apr 29
1
Need help on matrix calculation
Hello again, Let say I have 1 matrix: Mat <- matrix(1:12, 4, 3) rownames(Mat) <- letters[1:4] Now I want to subscript of Mat in following way: Subscript_Vec <- c("a", "e", "b", "c") However when I want to use this vector, I am geting following error: Mat[Subscript_Vec, ] Error: subscript out of bounds Basically I want to get my final matrix
2010 Jul 25
2
3d topographic map
Hi All- I would like to create a 3d topographic map using lat/lon and z(height). I have been scouring the R help pages and have not located the package I am looking for. Does anyone have a suggestion of package that will work for this? thanks- sherri
2003 Sep 17
5
using matrix data for function
Hi All, I have a function, f(x,y) I have a matrix of data, m, with the 1st column is x and the 2nd column is y What's the best way to get f(x,y) for each row of the matrix? I tried result<-f(m[,1],m[,2]) but it doesn't work. Thanks! Bing --------------------------------- 1060 Commerce Park Oak Ridge National Laboratory P.O. Box 2008, MS 6480 Oak Ridge, TN 37831-6480 Phone:
2009 May 24
2
Deleting columns from a matrix
useR's, I have a matrix given by the code: mat <- matrix(c(rep(NA,10),1,2,3,4,5,6,7,8,9,10,10,9,8,NA,6,5,4,NA,2,1,rep(NA,10),1,2,3,4,NA,6,7,8,9,10),10,5) This is a 10x5 matrix containing missing values. All columns except the second contain missing values. I want to delete all columns that contain ALL missing values, and in this case, it would be the first and fourth columns. Any column
2011 Jan 25
1
NA printing
Hi. I'm writing a print method for an object that includes a numeric matrix for which the lower diagonal elements are not meaningful. So I make the lower diagonal of my matrix NA and print it. But my co-author does not like NA there and wants a dash. I have tried coercing the matrix to character, essentially by M[is.na(M)] <- "-" but this interferes with the pleasing column
2013 Jan 24
2
Question on matrix calculation
Hello again, Ley say I have 1 matrix and 1 data frame: > mat <- matrix(1:15, 5) > match_df <- data.frame(Seq = 1:5, criteria = sample(letters[1:5], 5, replace = T)) > mat [,1] [,2] [,3] [1,] 1 6 11 [2,] 2 7 12 [3,] 3 8 13 [4,] 4 9 14 [5,] 5 10 15 > match_df Seq criteria 1 1 c 2 2 e 3 3 c 4 4 c 5
2007 Nov 06
2
wilcox test on two data frames
Hi all, Basically I have 2 data frames with equal dimension and I want to apply the wilcox.test to compare columns in the same position (i.e. 1st of df.A with 1st of df.B, 2nd of df.A with 2nd of df.B,...). Anyone give me an hint on this, as I think it is nicer to avoid loops, specially for huge dataframes (30000 x 200) Thanks in advance, Diogo André Alagador Portugal [[alternative HTML