Re: [R] Converting character to numeric using the package "XLConnect"

2017-08-30 Thread Jeff Newmiller
_______ >De : Jim Lemon >Envoy� : mercredi 30 ao�t 2017 15:00:32 >� : Nelly Reduan; r-help mailing list >Objet : Re: [R] Converting character to numeric using the package >"XLConnect" > >Hi Nelly, >Are you trying to convert hexadecimal to decimal? > >

Re: [R] Converting character to numeric using the package "XLConnect"

2017-08-30 Thread Jim Lemon
10,1]) ## Problem: must be numeric > > [1] "1" > > Thanks very much for your help. > Nell > > -- > *De :* Jim Lemon > *Envoyé :* mercredi 30 août 2017 15:00:32 > *À :* Nelly Reduan; r-help mailing list > *Objet :* Re: [R]

Re: [R] Converting character to numeric using the package "XLConnect"

2017-08-30 Thread Nelly Reduan
<- strtoi(set[index]) > print(set[10,1]) ## Problem: must be numeric [1] "1" Thanks very much for your help. Nell De : Jim Lemon Envoy� : mercredi 30 ao�t 2017 15:00:32 � : Nelly Reduan; r-help mailing list Objet : Re: [R] Converting cha

Re: [R] Converting character to numeric using the package "XLConnect"

2017-08-30 Thread Jeff Newmiller
nvoy� : mercredi 30 ao�t 2017 12:59:57 >� : Nelly Reduan >Cc : r-help@r-project.org >Objet : Re: [R] Converting character to numeric using the package >"XLConnect" > > >> On Aug 30, 2017, at 12:24 PM, Nelly Reduan >wrote: >> >> Hello, >>

Re: [R] Converting character to numeric using the package "XLConnect"

2017-08-30 Thread Jim Lemon
Hi Nelly, Are you trying to convert hexadecimal to decimal? nrdf Setting Value 1 Parameters a 2 Parameters b 3 Parameters c 4 Parameters d 5 Parameters e 6 Parameters 2 7 Parameters 8 8 Parameters 9 9 Parameters 7 10 1 a 11

Re: [R] Converting character to numeric using the package "XLConnect"

2017-08-30 Thread Nelly Reduan
via OneDrive Thanks very much for your help. Nell De : David Winsemius Envoy� : mercredi 30 ao�t 2017 12:59:57 � : Nelly Reduan Cc : r-help@r-project.org Objet : Re: [R] Converting character to numeric using the package "XLConnect" > On Aug 30, 2017,

Re: [R] Converting character to numeric using the package "XLConnect"

2017-08-30 Thread David Winsemius
> On Aug 30, 2017, at 12:24 PM, Nelly Reduan wrote: > > Hello, > > From an Excel file imported into R where each cell contains characters, I > would like to convert some characters to numeric. However, my code doesn’t > work. When I write data to worksheets in an Excel file, some numbers in t

[R] Converting character to numeric using the package "XLConnect"

2017-08-30 Thread Nelly Reduan
Hello, >From an Excel file imported into R where each cell contains characters, I >would like to convert some characters to numeric. However, my code doesn’t >work. When I write data to worksheets in an Excel file, some numbers in the >cells are stored as text (instead of numeric). Here is my c

Re: [R] Converting character to numeric: Error: (list) object cannot be coerced to type 'double'

2012-12-07 Thread Vikram Bahure
Thanks a lot. That was helpful. My apologize, as both "cmie.dts" and 'f" are same. On Fri, Dec 7, 2012 at 8:46 PM, Rui Barradas wrote: > Hello, > > It's the column that you want to convert, not the data.frame. > > f1 <- as.numeric(f$INE001A01036) > > Hope this helps, > Rui Barradas > Em 07-12-2

Re: [R] Converting character to numeric: Error: (list) object cannot be coerced to type 'double'

2012-12-07 Thread Rui Barradas
Hello, It's the column that you want to convert, not the data.frame. f1 <- as.numeric(f$INE001A01036) Hope this helps, Rui Barradas Em 07-12-2012 14:23, Vikram Bahure escreveu: Dear R users, I am facing a pretty a unusual problem while converting character to numeric. Any input would be appre

Re: [R] Converting character to numeric: Error: (list) object cannot be coerced to type 'double'

2012-12-07 Thread Sarah Goslee
Hi, You need to use as.numeric on the column, not the entire data frame. On Fri, Dec 7, 2012 at 9:23 AM, Vikram Bahure wrote: > Dear R users, > > I am facing a pretty a unusual problem while converting character to > numeric. Any input would be appreciated. > > Below is the code and error face

[R] Converting character to numeric: Error: (list) object cannot be coerced to type 'double'

2012-12-07 Thread Vikram Bahure
Dear R users, I am facing a pretty a unusual problem while converting character to numeric. Any input would be appreciated. Below is the code and error faced: --- *> str(cmie.dts)* *'data.frame': 4397 obs. of 1 variable:* * $ INE001A01036: chr "1482181740.000

Re: [R] converting character to numeric

2011-06-21 Thread Don McKenzie
@gmail.com; r-help@r- project.org Subject: Re: [R] converting character to numeric I have to chime in here with a slight revision to read.csv(), for those of us like me who have whined over time about "stringsAsFactors". (tested on my machine macOSX 10.6) readFF.csv <- fun

Re: [R] converting character to numeric

2011-06-21 Thread Bill.Venables
] Sent: Wednesday, 22 June 2011 8:40 AM To: Venables, Bill (CMIS, Dutton Park) Cc: stevenkennedy2...@gmail.com; alina...@gmail.com; r-help@r-project.org Subject: Re: [R] converting character to numeric I have to chime in here with a slight revision to read.csv(), for those of us like me who hav

Re: [R] converting character to numeric

2011-06-21 Thread Don McKenzie
r(oranges)) ... }) Bill Venables. -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-bounces@r- project.org] On Behalf Of Steven Kennedy Sent: Wednesday, 22 June 2011 6:52 AM To: Alina Sheyman Cc: r-help@r-project.org Subject: Re: [R] converting character to num

Re: [R] converting character to numeric

2011-06-21 Thread Denis Kazakiewicz
org] On Behalf Of Steven Kennedy Sent: Wednesday, 22 June 2011 6:52 AM To: Alina Sheyman Cc: r-help@r-project.org Subject: Re: [R] converting character to numeric You need: mydata$apples<-as.numeric(mydata$apples) On Wed, Jun 22, 2011 at 6:38 AM, Alina Sheyman wrote: I'm trying to conv

Re: [R] converting character to numeric

2011-06-21 Thread Bill.Venables
oranges <- as.numeric(as.character(oranges)) ... }) Bill Venables. -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of Steven Kennedy Sent: Wednesday, 22 June 2011 6:52 AM To: Alina Sheyman Cc: r-help@r-project.org S

Re: [R] converting character to numeric

2011-06-21 Thread Sarah Goslee
Hi Alina, On Tue, Jun 21, 2011 at 4:38 PM, Alina Sheyman wrote: > I'm trying to convert data from character to numeric. > >  I've imported data as a csv file, I'm assuming that the import is a > database - are all the columns in  a database considered "vectors"  and that > they can be  operated o

Re: [R] converting character to numeric

2011-06-21 Thread Steven Kennedy
You need: mydata$apples<-as.numeric(mydata$apples) On Wed, Jun 22, 2011 at 6:38 AM, Alina Sheyman wrote: > I'm trying to convert data from character to numeric. > >  I've imported data as a csv file, I'm assuming that the import is a > database - are all the columns in  a database considered "ve

Re: [R] converting character to numeric

2011-06-21 Thread Denis Kazakiewicz
Hi Sorry, can't answer your question However, I had exactly the same problem and just came back to my spreadsheet redactor and changed the format of cells Denis I'm trying to convert data from character to numeric. I've imported data as a csv file, I'm assuming that the import is a database

[R] converting character to numeric

2011-06-21 Thread Alina Sheyman
I'm trying to convert data from character to numeric. I've imported data as a csv file, I'm assuming that the import is a database - are all the columns in a database considered "vectors" and that they can be operated on individually Therefore I've tried the following mydata <- as.numeric(myda