Well that's different. Can you restart R and get the same error
message? If so, change print() to print.default() to get around the
class error for now.
And I just want to make sure of one thing: you did actually change
"valueFromImport" to whatever you named the output of the read.csv()
call, right? I don't know why what would have lead to the error you
got, but one never knows...
If none of the above works, please reply with the result of dput() on
your data and the results of sessionInfo()
Michael
PS -- It's good practice to cc the list as well.
On Wed, Oct 12, 2011 at 3:33 PM, Veerappa Chetty <chettyvk at gmail.com>
wrote:> Thanks.
> I get this:
> print(valueFromImport - 43988014)
> Error in print(valueFromImport - 43988014) :
> ? error in evaluating the argument 'x' in selecting a method for
function
> 'print'
>
>
>
>
>
> On Wed, Oct 12, 2011 at 3:20 PM, R. Michael Weylandt
> <michael.weylandt at gmail.com> wrote:
>>
>> Are you sure its being imported into R without the decimal and that
>> it's not just a print option? I can't off the cuff think of a
reason
>> why that would happen...
>>
>> Try print(valueFromImport - 43988014) and see what you get
>>
>> Michael
>>
>> On Wed, Oct 12, 2011 at 3:16 PM, Veerappa Chetty <chettyvk at
gmail.com>
>> wrote:
>> > Hi,
>> > When I import an excel "CSV" file, large numbers such as
" 43988014.3"
>> > is
>> > imported as "43988014", leaving out the decimal
".4". How to import
>> > keeping
>> > the fraction?
>> > Thanks.
>> > Chetty
>> >
>> > --
>> > Professor of Family Medicine
>> > Boston University
>> > Tel: 617-414-6221, Fax:617-414-3345
>> > emails: chettyvk at gmail.com,vchetty at bu.edu
>> >
>> > ? ? ? ?[[alternative HTML version deleted]]
>> >
>> > ______________________________________________
>> > R-help at r-project.org mailing list
>> > https://stat.ethz.ch/mailman/listinfo/r-help
>> > PLEASE do read the posting guide
>> > http://www.R-project.org/posting-guide.html
>> > and provide commented, minimal, self-contained, reproducible code.
>> >
>
>
>
> --
> Professor of Family Medicine
> Boston University
> Tel: 617-414-6221, Fax:617-414-3345
> emails: chettyvk at gmail.com,vchetty at bu.edu
>