Giter VIP home page Giter VIP logo

Comments (10)

GeoBosh avatar GeoBosh commented on May 30, 2024

I could make a guess or guesses what is wrong. But if you show here what you put in your documentation file (roxygen2 comments if you use them, or the Rd chunk otherwise), I will tell you exactly what is wrong.:)

Even better, put your package on github and I will look it up there,

from rdpack.

yayayaoyaoyao avatar yayayaoyaoyao commented on May 30, 2024

Thank you for the reply. My R package isn't ready yet. I'm currently working on inserting references. I noticed that some people simply type in the references, while others find Rdpack helpful. However, I've encountered an issue where Rdpack doesn't display the references. I follow exactly the same thing as below. My REFERENCES.bib is like what you have in the inst folder. When I call the reference in R help page, I just use @references \insertRef{xxx}{xxx}, it returns the screenshot. Do you have any suggestions?

Add the following lines to file "DESCRIPTION":

Imports: Rdpack
RdMacros: Rdpack
Make sure the capitalisation of RdMacros: is as shown. If the field RdMacros: is already present, add "Rdpack" to the list on that line. Similarly for field "Imports:".

Add the following line to file "NAMESPACE":

importFrom(Rdpack,reprompt)
The equivalent line for roxygen2 is

#' @importFrom Rdpack reprompt
Create file REFERENCES.bib in subdirectory inst/ of your package and put the BibTeX references in it.

from rdpack.

GeoBosh avatar GeoBosh commented on May 30, 2024

Indeed, more than 400 packages on github and Bioconductor use Rdpack for this purpose.

The second argument to the macro should be the name of your package:

 @references \insertRef{xxx}{name_of_your_package}

Please, let me know if this solves the issue.

By the way, it doesn't matter that your package is unfinished. It is very useful to commit and push while you work, at the very least this is a bulletproof backup.

from rdpack.

yayayaoyaoyao avatar yayayaoyaoyao commented on May 30, 2024

No, it does not slove the issue. @references \insertRef{xxx}{name_of_your_package} gives the results of screen shoot.

from rdpack.

yayayaoyaoyao avatar yayayaoyaoyao commented on May 30, 2024

Do you know some packages use Rdpack ? Maybe I can check against it.

from rdpack.

GeoBosh avatar GeoBosh commented on May 30, 2024

If you go to the CRAN page of Rdpack, you will see a long list of packages that use it. This includes my packages 'sarima', 'pcts'. Others are plm, etc.

Do you get messages when you build the package? Also, are you trying to just render the page inside Rstudio? What happens if you install the package, load it with library(), and ask for the help page using ?xxx.

Also, as I said, putting the package on github will allow me to see what exactly is going on. Currently, I cannot be sure:

@references \insertRef{xxx}{name_of_your_package} 

This is certainly not what you put in the package. You certainly replace xxx with an actual reference and the second argument with the name of your package.

from rdpack.

yayayaoyaoyao avatar yayayaoyaoyao commented on May 30, 2024

There is no message when I build the package.
Yes, I am trying to just render the page inside R studio.
The screenshot is exactly what happened after I install the package, load it with the library and use the ?xxx.

from rdpack.

GeoBosh avatar GeoBosh commented on May 30, 2024

As I said before, If I don't know exactly what is going on, I can only guess. It is so easy to to put the package to github or send me a link to the source somewhere else.

from rdpack.

GeoBosh avatar GeoBosh commented on May 30, 2024

just checked Rdpack::viewRd shows the result correctly. But not in Rstudio when I use ?xxx, do you know why?

I think that RStudio fixed this several years ago, so it should render it correctly if you have reasonably recent version of RStudio.
Do you use library() or devtools::load_all()? If the former, it might be a regression in RStudio?

from rdpack.

yayayaoyaoyao avatar yayayaoyaoyao commented on May 30, 2024

I think the issue is I updated something in the package and I am running the check for the package. at the same time, the old package gives this issue. After the check is done, I reinstall the package, it works. Thanks.

from rdpack.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.