[R] [SPAM?] Re: Data Package Query

Jeff Newmiller jdnewmil at dcn.davis.CA.us
Thu Jun 27 22:20:37 CEST 2013


Please reply to all so the thread stays on the mailing list for all to see (and correct if wrong information is given).

Regarding your code below, either you are missing a library statement to load a package that contains this "trial" data, or you are intending to read in your own data set but are not yet aware of how that is done.

I could find no package containing a data set named "trial" (but I might have missed one). 

If you have some data of your own, then the data function is almost certainly not the right tool for the job. A PDF document called "R Data Import/Export" is supplied with R that can get you started. There are also various intro books available.
---------------------------------------------------------------------------
Jeff Newmiller                        The     .....       .....  Go Live...
DCN:<jdnewmil at dcn.davis.ca.us>        Basics: ##.#.       ##.#.  Live Go...
                                      Live:   OO#.. Dead: OO#..  Playing
Research Engineer (Solar/Batteries            O.O#.       #.O#.  with
/Software/Embedded Controllers)               .OO#.       .OO#.  rocks...1k
--------------------------------------------------------------------------- 
Sent from my phone. Please excuse my brevity.

Yasmine Refai <y_refai at hotmail.com> wrote:

>Unfortunately, i have no variable called "data". The below is the
>syntax i am running:
>data(trial)
>fit<-logistf(data=trial, y=x1+x2+x3)
>
>Sorry for the disturbance.
>
>Regards!
>
>On Jun 27, 2013, at 9:47 AM, "Jeff Newmiller"
><jdnewmil at dcn.davis.CA.us> wrote:
>
>> "data" is a base function (so you should not have to load any
>packages to use it), and it is not capitalized. Depending on the
>particular data set you want the data function to load, you may need to
>load the package that contains that data set.
>> 
>> A common error by beginners (which may or may not be your problem in
>this case) is to create a variable called "data". Unfortunately this
>hides the function named "data" and from that time forward that R
>session doesn't work when you type example code that uses the data
>function. If this is your problem, the best solution is to restart R
>and do your analysis from the beginning using a different variable name
>than "data". (This is why keeping your working code in a separate text
>file is standard operating procedure.)
>> 
>> Note that I am guessing here... the Posting Guide asks you to give a
>reproducible example so we don't have to guess what you have done.
>>
>---------------------------------------------------------------------------
>> Jeff Newmiller                        The     .....       .....  Go
>Live...
>> DCN:<jdnewmil at dcn.davis.ca.us>        Basics: ##.#.       ##.#.  Live
>Go...
>>                                      Live:   OO#.. Dead: OO#.. 
>Playing
>> Research Engineer (Solar/Batteries            O.O#.       #.O#.  with
>> /Software/Embedded Controllers)               .OO#.       .OO#. 
>rocks...1k
>>
>---------------------------------------------------------------------------
>
>> Sent from my phone. Please excuse my brevity.
>> 
>> Yasmine Refai <y_refai at hotmail.com> wrote:
>> 
>>> Hello,
>>> 
>>> When i type in the below syntax:
>>> Data (name of the data set)
>>> 
>>> I get an error message specifying that the "data" package is not
>found.
>>> 
>>> Please note that i installed all packages having the word "data" 
>>> included in them and loaded all these packages.
>>> 
>>> Please advice.
>>> 
>>> Regards!
>>> ______________________________________________
>>> 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.
>>



More information about the R-help mailing list