similar to: string to numeric question

Displaying 20 results from an estimated 700 matches similar to: "string to numeric question"

2012 Oct 31
2
Aggregate Table Data into Cell Frequencies
R-help - I have this set of aggregated tables (sample data below via dput()). And I would like to have delayValue as the column variables with the "temp" (temp1, temp2, temp3) values as the row variables. However I would like to have the temp variables *aggregated into single rows* so that I have the frequency ("Freq" | counts) of each time each "delayValue" occurs
2006 Apr 19
1
Probable Numeric Bugs in svd function (PR#8781)
Hello,=0D =0D I just noticed that the "svd" function does not work properly for some=0D sparse matrices.=0D When I replace the 0 by very small noises (let's say 10^-16), it then=0D works.=0D The test I've performed is to compared the singular values to the eigen=0D values (as I work with squarred matrices).=0D =0D Here is the code (I may be wrong!):=0D =0D
2007 Mar 17
5
2nd attempt - Repairing vorbis files
Hello, No public anwer came to my previous post, and my problem is urgent, so I'm trying again. I'm using Ogg Vorbis since 2000 and some of my files appear to be damaged - at least some players reject some of them (WinAmp, Quintessential Media Player beta 116). Is there a repair tool for Windows which could rebuild vorbis files so that they all could be played in WinAmp, which is very
2007 Oct 13
2
AGI with System() ?
Uuugh..for the life of me, i cannot delete sound files using "EXEC System(rm /var/lib/asterisk/sounds/blah.gsm)" through AGI the AGI debug log indicates the command executes successful ( equals 0) but my files are clearly still there. If i try System(rm ...) in my extensions.conf diaplan it'll work there. Is there a bug in the AGI to use "System" ? because i tried to
2010 Sep 24
0
multivariate multiple regression coefficient
hi, I considered multivariate multiple regression for respons, predictor, each 5 dimension. on going process, through initb <- eigen(temp)$vectors[,1:3] temp <- vhalf%*%Kproduct(Ir,initb) (herein 'vhalf' is root for inverse of covariance matrix and 'Kproduct' is Kronecker product) and then process regression. However, I have tried using the
2011 Feb 03
3
R Data Manipulation - Transposing Data by a Given Column, Like User_ID
Hello, I'd like to transpose data to create an analysis-friendly dataframe. See below for an example, I was unable to use t(x) and I couldn't find a function with options like PROC TRANSPOSE in SAS. The ideal solution handles variable quantities of SITE - but beggars can't be choosers. :-) Thank you in advance, Mike ## INPUT DATA USER_ID<-c(1,1,1,2,2,2,3,3,4) SITE
2010 Jun 09
2
Help needed on "switch" function
Hi all, Here I am trying to implement the switch() function to choose value of a variable depending on the value of an input variable :   temp1 <- "1"               temp1.name <- switch(temp1,                                   1 == "aa",                                   2 == "bb",                                   3 == "cc",
2012 Mar 27
0
sampling matrix 1 conditional on values in matrix 2
Hi I am trying to estimate bottom temperatures over a particular depth range, based on one dataset containing synthetic temperature profiles (for set depths) and another that contains information on bathymetry. I need to do this for multiple regions and thus would ideally like an automated solution that is quicker and more accurate than the manual option I currently have! I have not had much luck
2009 Feb 11
2
sorting a matrix by the column
this is a bad question but I can't figure it out and i've tried. if i sort the 2 column matrix , temp1, by the first column, then things work as expected. But, if I sort the 1 column matrix, temp2, then it gets turned coerced to a vector. I realize that I need to use drop=FALSE but i've put it in a few different places with no success. Thanks. temp1 <-
2004 May 18
1
VoIP Termination w/ 402 or 712 area code?
I realize this is a shot in the dark, but I'm trying to find a VoIP provider that offers 402 or 712 area code DID numbers. I'm almost completely convinced that no one offers these area codes (eastern Nebraska, western Iowa), however considering the wide audience of this mailing list I thought this would be a good place to ask. I would prefer a provider that allows for Asterisk use, but I
2009 Jul 01
2
?max (so far...)
Hi, I have a data.frame that is date ordered by row number - earliest date first and most current last. I want to create a couple of new columns that show the max and min values from other columns *so far* - not for the whole data.frame. It seems this sort of question is really coming from my lack of understanding about how R intends me to limit myself to portions of a data.frame. I get the
2009 Feb 11
2
error in my previous message
i'm sorry. i had an error in my previous code because i left out a letter in the rownames. while fixing that, i also found a solution. so i'm sorry for the confusion. below is my fix. temp2 <- matrix(rnorm(10),nc=1,nrow=10) rownames(temp2) <-
2006 Jan 04
3
matrix math
I am using R 2.1.1 in an windows XP environment. I have 2 dataframes, temp1 and temp2. Each dataframe has 20 variables (“cocolumns") and 525 observations (“rows”). All variables are numeric. I want to create a new dataframe that also has 20 columns and 525 rows. The values in this dataframe should be the sum of the 2 other dataframe. (i.e. temp1$column
2009 May 15
4
replace "%" with "\%"
Dear all, I'm trying to gsub() "%" with "\%" with no obvious success. > temp1 <- c("mean", "sd", "0%", "25%", "50%", "75%", "100%") > temp1 [1] "mean" "sd" "0%" "25%" "50%" "75%" "100%" > gsub("%",
2005 May 20
4
issues with identical()
Hi all, hope you having a nice day, I ahve this weird results with identical (probably I am not understanding correctly what it does ...) I have these two data frames and I issue : > identical(temp, temp1) [1] FALSE However, these data frames are Nx2 and when I issue: > identical(temp[,2], temp1[,2]) [1] TRUE > identical(temp[,1], temp1[,1]) [1] TRUE and the results from str >
2013 Mar 29
1
multiple plots and looping assistance requested (single plot)
HI Irucka, Please check this: temp<- structure(list(`:Bostoncitydata` = structure(list(Month = c(1L, 2L, 3L, NA), Data1 = c(1.5, 12.3, 11.4, NA), Data2 = c(9.1342, 12.31, 3.5, NA)), .Names = c("Month", "Data1", "Data2"), class = "data.frame", row.names = c(NA, -4L)), `:Chicagocitydata` = structure(list(Month = c(1L, 2L, 3L, 4L, 5L, NA), Data1 = c(1.52,
2008 Aug 26
1
parse and eval character vector
Dear R-help, I have a character vector, some elements will be numeric, some not, and some even empty. E.g.: temp1 <- c("abcd"," 2 ","") I'm only interested in the numeric elements, the rest I can just throw away. It is easy enough to loop through the vector: temp <- try(eval(parse(text=temp1[1])), silent=TRUE); class(temp) # try-error temp <-
2011 Mar 09
2
Anomaly with unique and match
I stumbled onto this working on an update to coxph. The last 6 lines below are the question, the rest create a test data set. tmt585% R R version 2.12.2 (2011-02-25) Copyright (C) 2011 The R Foundation for Statistical Computing ISBN 3-900051-07-0 Platform: x86_64-unknown-linux-gnu (64-bit) # Lines of code from survival/tests/singtest.R > library(survival) Loading required package: splines
2010 Nov 19
3
Sweave Dynamic Graph Question
i have a time Series of IBM closing px from 1/1/2000 to today I want to graph the time serie by dividing the graph by year and month all the monthly graphs with the same year will go to one page. so from 1/1/2000 to 11/19/2010. i will have 11 pages, and each page will have 12 graphs (jan to dec) except for 2010. I am able to do it in R, but when i use sweave, I can only print the last page.
2010 Oct 14
1
Basic data question
I have a question about the output given below after running few lines of code. Surely a 101 query! MF_Data <- read.csv("MF_Data_F.txt", header = F, sep="|") temp <- head(MF_Data) #Get the sample Data temp1 <- subset(temp, select= c(V1,V4,V6)) #where V1, V4, V6 are the col names .. to Get the relevant data names(temp1) <- c('Ticker',