-
Notifications
You must be signed in to change notification settings - Fork 7
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
Docstring unable to view the comment #27
Comments
I could not replicate this issue. Are you still affected by it? |
I'm also unable to reproduce this error. If you have any further info let me know but I'm going to close this for the time being. |
I do have the same issue. |
Interesting - I still can't reproduce but can you provide the output of |
The above code is working now. But this one does not library(docstring) |
I had a similar problem. I fixed it by using docstring(my_function) rather than ?my_function. I got an loadNamespace(x) error regarding rstudioapi the first time, but could solve it by install.packages("rstudioapi") |
I found that we can't have two functions that both have docstrings. They have the issue most likely because they had another function with docstrings.
The output shows
|
This is very helpful information. If you run |
Interesting. I'll investigate. Are you using RStudio? Does the problem persist if you use R outside of RStudio? |
Yes, I use RStudio. I tried RGUI again, and got the same error. |
It seems there has already been a pull request to fix it. |
I am unable to view the comments after changing the below function name and trying to view the comments , snippet and code below for reference purpose
Initially my function name was square but then changed to another variable and then tried to view the comments but I was unable to do so

### code for reference purpose
`
rm(list=ls(all=T))
library(docstring)
ab <- function(a){
#' @title :square function
#' @description : print the squares of the number
#'from 1 to the input given
#' @param : input number
#' @output : provide the squares of the input range
for(i in 1:a){
b <- i^2
print(b)
}
}
?ab
`
The text was updated successfully, but these errors were encountered: