You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Please see below how this looks like for the Issue 1:
Click to expand example of the Issue 1
Attaching package: ‘docstring’
The following object is masked from ‘package:utils’:
?
> label_function1 <- function(string) {
+
+ #' Labeller function.
+ #'
+ #' @description Default function used as part of faceting that is passed into labeller function.
+ #'
+ #' @param string String of title.
+ #' @usage Create labels.
+ #' @note Uses: TO-DO.
+ #' @examples
+ #' TO-DO
+ #' @author Martin Cadek November 2020
+ string <- str_replace_all(string, "_", " ")
+ string <- str_to_title(string)
+ string
+ }
>
> label_function2 <- function(string) {
+
+ #' Labeller function.
+ #'
+ #' @description Default function used as part of faceting that is passed into labeller function.
+ #'
+ #' @param string String of title.
+ #' @usage Create labels.
+ #' @note Uses: TO-DO.
+ #' @examples
+ #' TO-DO
+ #' @author Martin Cadek November 2020
+ string <- str_replace_all(string, "_", " ")
+ string <- str_to_title(string)
+ string
+ }
>
> ?label_function1
> ?label_function2
No documentation for ‘label_function2’ in specified packages and libraries:
you could try ‘??label_function2’
This is the output of the documentation in the Issue 1:
Click to expand example output from the Issue 1
label_function1 {TempPackage} R Documentation
Labeller function.
Description
Default function used as part of faceting that is passed into labeller function.
Usage
Create labels.
Arguments
string
String of title.
Note
Uses: TO-DO.
Author(s)
Martin Cadek November 2020
Examples
TO-DO
Here's the same example but the function order is reversed:
Click to expand example of the Issue 2
Attaching package: ‘docstring’
The following object is masked from ‘package:utils’:
?
> label_function1 <- function(string) {
+
+ #' Labeller function.
+ #'
+ #' @description Default function used as part of faceting that is passed into labeller function.
+ #'
+ #' @param string String of title.
+ #' @usage Create labels.
+ #' @note Uses: TO-DO.
+ #' @examples
+ #' TO-DO
+ #' @author Martin Cadek November 2020
+ string <- str_replace_all(string, "_", " ")
+ string <- str_to_title(string)
+ string
+ }
>
> label_function2 <- function(string) {
+
+ #' Labeller function.
+ #'
+ #' @description Default function used as part of faceting that is passed into labeller function.
+ #'
+ #' @param string String of title.
+ #' @usage Create labels.
+ #' @note Uses: TO-DO.
+ #' @examples
+ #' TO-DO
+ #' @author Martin Cadek November 2020
+ string <- str_replace_all(string, "_", " ")
+ string <- str_to_title(string)
+ string
+ }
>
> # Reverse
> ?label_function2
> ?label_function1
No documentation for ‘label_function1’ in specified packages and libraries:
you could try ‘??label_function1’
The text was updated successfully, but these errors were encountered:
I'm also having this issue exactly - also doesn't work when different functions from different scripts are called; only one docstring is "live" at the time. I've had a look at the temp folders created in windows, and can see only one Rd file at a time - for example, if I have a script that contains two functions with docstrings, and I run the script, one of the docstrings will appear in the temporary folder. If I then do docstring([other_function]) the .Rd that was in the temporary folder for the first function is deleted, and replaced with an .Rd file for the [other_function].
EDIT: To be clear, this is a problem when trying to do ?[other_function], docstring() still works, but isn't as intuitive, which is important when I'm trying to teach people to document their code this way when they aren't used to it
I am experiencing issue where only the first function that is loaded is rendered in documentation, however, any functions following are not found.
Thank you for any help you can provide.
The session info:
Click to expand example of the Session Info
Please see below how this looks like for the Issue 1:
Click to expand example of the Issue 1
This is the output of the documentation in the Issue 1:
Click to expand example output from the Issue 1
Here's the same example but the function order is reversed:
Click to expand example of the Issue 2
The text was updated successfully, but these errors were encountered: