DS4PS / cpp-527-fall-2020

http://ds4ps.org/cpp-527-fall-2020/
0 stars 1 forks source link

help() error #22

Open nicolehillsmall opened 3 years ago

nicolehillsmall commented 3 years ago

When trying to test out the documentation,

help( "create_game" ) returns the following...

No documentation for ‘create_game’ in specified packages and libraries: you could try ‘??create_game’

I'm not quite sure what I'm doing wrong...this is the only part of my package that does not function correctly. The create_game() part of the documentation is completely filled out.

@lecy

lecy commented 3 years ago

Have you installed the package and loaded it with a library() command?

If not loaded it won't be able to find the function.

nicolehillsmall commented 3 years ago

I completed the rest of the documentation and then I was able to use help()

lecy commented 3 years ago

Excellent, thanks for the update.

jpapczyn commented 3 years ago

@lecy Professor,

I followed the steps and am getting the same error as nicole.

setwd( "C:\Users\joeyp\Desktop\Data Wrangling" ) devtools::install( "montyhall" ) library( montyhall ) create_game() play_game() play_n_games() help("create_game")

and this is the error:

help("create_game") No documentation for ‘create_game’ in specified packages and libraries: you could try ‘??create_game’

nicolehillsmall commented 3 years ago

@jpapczyn Did you complete all of the documentation?

I only had one function documented and it gave me the same error...after I went back and completed the documentation for the remaining functions, help() worked perfectly.

jpapczyn commented 3 years ago

@jpapczyn Did you complete all of the documentation?

I only had one function documented and it gave me the same error...after I went back and completed the documentation for the remaining functions, help() worked perfectly.

Do you mean documenting it within the R script? If so then yes I have documented all the functions similar to the example.

lecy commented 3 years ago

After completing documentation (the Roxygen fields in the R script) did you run the create documents function to generate the Rd files in the montyhall package?

jpapczyn commented 3 years ago

I have done the following step but my man folder is empty.

Place your documented R scripts into the “R” folder in your package directory, then try:

setwd( "montyhall" ) devtools::document()

You should see:

Updating montyhall documentation

Updating roxygen version in C:\Users\jdlecy\Documents\montyhall/DESCRIPTION

Writing NAMESPACE

Loading montyhall

Writing create_game.Rd

You will see some errors as well if you have not yet finished documenting your functions. Ignore them for now.

You will now have a new folder in your montyhall directory called “man”, short for “manuals”. The documentation files have an .Rd (R documentation) extension.

lecy commented 3 years ago

Do you have a new HTML folder?

jpapczyn commented 3 years ago

no sir. I submitted everything I have on the assignments page.