-1
$\begingroup$

I have a table of data that I have already imported in R as variable Dataset and I want to apply the function fitdistr() to my column timeSec with "poisson" option, but I do not know how extract my data.

So I tried this:

Myparms <- fitdistr(timeSec.Dataset, "poisson")

the error was:

Error in fitdistr(timeSec.Dataset, "poisson") :
  objet 'timeSec.Dataset' introuvable

I just begin to use R, so I am grateful for any help.

$\endgroup$
  • 1
    $\begingroup$ Please provide some kind of minimum example. The simplest problem I see here is the names timeSec.Dataset" and "dureediff_sec:dataset" do not even match and therefore it cannot be found by R. $\endgroup$ – Alex2006 Jun 5 '18 at 14:24
  • $\begingroup$ yes, you're right, I just change it here to be clear and simple, and I forgot to change it in all msg $\endgroup$ – AsmaShine Jun 5 '18 at 14:26
  • $\begingroup$ please, revise my message I had make some changes. thank you $\endgroup$ – AsmaShine Jun 5 '18 at 14:32
0
$\begingroup$

The problem is the data extraction in R. To extract the column named "timeSec" from the data.frame "Dataset" you have to use either

  Dataset$timeSec 

or

   Dataset[,"timeSec"] 

Both R commands do the same thing.

| cite | improve this answer | |
$\endgroup$
  • $\begingroup$ You're welcome. That's a typical problem for "R newbies". $\endgroup$ – Alex2006 Jun 5 '18 at 14:43

Not the answer you're looking for? Browse other questions tagged or ask your own question.