Comments (9)
Are you calling these functions without attaching first? I think the environment .spEnv
is generated when the spatstat package is attached. Therefore the following will generate the error you are experiencing: spatstat::versionstring.spatstat()
. Is it possible for you to attach the package (e.g. via require(spatstat)
) or do you need a workaround?
from spatstat.
I'm using Imports
in the DESCRIPTION
file of my package and then call spatstat functions using the full namespace, e.g. spatstat::mppm()
.
Of note, this works for some spatstat objects, such as spatstat::ppp()
.
I would like to avoid using require(spatstat)
within my package. What would you recommend?
from spatstat.
Attaching the spatstat package via library(spatstat)
in the main script that calls function of my custom package solved the problem. The user of my package shouldn't have to attach the spatstat package, however, but only my custom package (which depends on spatstat).
from spatstat.
Including spatstat in Depends
in the DESCRIPTION
file also solves the problem. But I think it would be nicer if spatstat would use namespaces consistently.
from spatstat.
spatstat:::versionstring.spatstat
is meant to give the version number of the currently loaded version of spatstat
. I'll make a workaround for the case where spatstat
is not loaded.
from spatstat.
This problem has been fixed in the current development version (1.44-1.016). Please try this out with your custom package and let us know if it is satisfactory.
from spatstat.
Using the development version, I get
Error in do.call("ppm", append(list(...), list(rbord = rbord, justQ = TRUE)), : could not find function "ppm"
The problem also affects other functions, in my case profilepl()
.
from spatstat.
In spatstat
development version 1.44-1.020 we have fixed this latest problem.
If you still encounter namespace problems using this version, then your package effectively requires the spatstat
namespace to be imported. I'd suggest that your package DESCRIPTION
file should declare that it Imports: spatstat, and the NAMESPACE
file should declare either
import(spatstat)
or at least
importFrom(spatstat, ppm, profilepl, etc, etc, etc)
including the names of all the spatstat
functions that are needed to prevent namespace problems.
from spatstat.
Putting import(spatstat)
in the NAMESPACE
file did the trick. Thanks!
from spatstat.
Related Issues (20)
- Bug in `inradius()` for rectangular windows HOT 1
- object ‘markvario’ is not exported by 'namespace:spatstat'
- object ‘markvario’ is not exported by 'namespace:spatstat' HOT 3
- object ‘CDF’ is not exported by 'namespace:spatstat' HOT 3
- 'as.ppp' is not an exported object from 'namespace:spatstat' HOT 8
- Scaling of linim objects HOT 3
- Error when simulating determinantal point process HOT 1
- Bug in visual debugger of rmh ? HOT 3
- I cannot update spatstat HOT 1
- Pool rhohat estimates HOT 1
- object ‘as.data.frame.ppp’ is not exported by 'namespace:spatstat' HOT 5
- wrong result for the dclf statistic in dclf.test()? HOT 2
- some wrong distances in delaunayDistance() ?? HOT 2
- R code for the spatstat book HOT 2
- Install issue with spatstat.geom on R version 4.3.1 HOT 2
- rLGCP depends on RandomFieldsUtils which is no longer supported HOT 2
- Jest does not return Fest and Gest HOT 2
- Jest ignores eps HOT 6
- is.subset.owin does not recognise real subset HOT 7
- Negative values for lambda using density() HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from spatstat.