Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Solution to the "checking examples ... ERROR" #2550

Closed
nvietto opened this issue Jan 2, 2024 · 1 comment
Closed

Solution to the "checking examples ... ERROR" #2550

nvietto opened this issue Jan 2, 2024 · 1 comment

Comments

@nvietto
Copy link

nvietto commented Jan 2, 2024

I was getting the error below for a package I'm working on, I don't know if anyone has gotten this error but the solution is to head to the "man" file in your project and delete the hello.Rd file. The file automatically thrown in when you create a package using the project drop down feature in RStudio.

❯ checking examples ... ERROR
Running examples in ‘packagename-Ex.R’ failed
The error most likely occurred in:

base::assign(".ptime", proc.time(), pos = "CheckExEnv")

Name: hello

Title: Hello, World!

Aliases: hello

** Examples

hello()
Error in hello() : could not find function "hello"
Execution halted

Might be useful to remove the automatic hello.Rd file from that option or add a note.

Thanks!

@jennybc
Copy link
Member

jennybc commented Jan 4, 2024

I can't replicate this (and, even if I could, it would really be an RStudio problem). The package RStudio creates for me does contain man/hello.Rd. But it also defines a function hello() in R/hello.R and exports it via the NAMESPACE. I can immediately pass R CMD check with devtools::check().

@jennybc jennybc closed this as not planned Won't fix, can't repro, duplicate, stale Jan 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants