[R] Why isn't R recognising integers as numbers?

Ted Byers r.ted.byers at gmail.com
Mon Sep 22 03:01:57 CEST 2008


I have a number of files containing anywhere from a few dozen to a few
thousand integers, one per record.

The statement "refdata18 =
read.csv("K:\\MerchantData\\RiskModel\\Capture.Week.18.csv", header =
TRUE,na.strings="")" works fine, and if I type refdata18, I get the integers
displayed, one value per record (along with a record number).  However, when
I try " fitdistr(refdata18,"negative binomial")", or hist.scott(refdata18,
prob = TRUE), I get an error:

Error in fitdistr(refdata18, "negative binomial") : 
  'x' must be a non-empty numeric vector
Or
Error in hist.default(x, nclass.scott(x), prob = prob, xlab = xlab, ...) : 
  'x' must be numeric

How can it not recognise integers as numbers?

Thanks

Ted
-- 
View this message in context: http://www.nabble.com/Why-isn%27t-R-recognising-integers-as-numbers--tp19600308p19600308.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list