-
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
Problem z ładowaniem innych pakietów (sodium, mockery) #16
Comments
A jak się to technicznie robi? |
Powinny być w imports, są w suggests, trzeba też dodać explicite odwołanie się do tych pakietów.Imports: packages listed here must be present for your package to work. In fact, any time your package is installed, those packages will, if not already present, be installed on your computer (devtools::load_all() also checks that the packages are installed). Adding a package dependency here ensures that it’ll be installed. However, it does not mean that it will be attached along with your package (i.e., library(x)). The best practice is to explicitly refer to external functions using the syntax package::function(). This makes it very easy to identify which functions live outside of your package. This is especially useful when you read your code in the future. If you use a lot of functions from other packages this is rather verbose. There’s also a minor performance penalty associated with :: (on the order of 5µs, so it will only matter if you call the function millions of times). You’ll learn about alternative ways to call functions in other packages in namespace imports. Suggests: your package can use these packages, but doesn’t require them. You might use suggested packages for example datasets, to run tests, build vignettes, or maybe there’s only one function that needs the package. Packages listed in Suggests are not automatically installed along with your package. This means that you need to check if the package is available before using it (use requireNamespace(x, quietly = TRUE)). There are two basic scenarios: |
Moim zdaniem te pakiety powinny zostać w suggests. Pakiet |
Zgadzam się. Z pakietem |
Pojawił się u mnie problem z pakietami rjson, caret po pobraniu jako bibiloteka. Czy są one umieszczone w odpowiednim segmencie DESCRIPTION ? |
obydwa są w imports więc powinny działać |
Tak, już jest wszystko ok . |
Po pobraniu repo i wywołaniu funkcji check() pojawiają się błędy w sytuacji, gdy nie ma się zainstalowanych pakietów sodium i mockery. Dobrze byłoby, gdybyśmy umożliwili automatyczne instalowanie potrzebnych pakietów zamiast zmuszać użytkownika do ręcznej instalacji.
The text was updated successfully, but these errors were encountered: