Skip to content

Error loading sf package - "package or namespace load failed" #1912

@erikpeterson20

Description

@erikpeterson20

I'm trying to use spdep package to create an auto-covariate. When I try to load spdep I receive the following error message regarding the sf package is needed by spdep:

library(spdep)
Loading required package: sf
Error: package or namespace load failed for ‘sf’ in namespaceExport(ns, exports):
undefined exports: as_difftime, as_units, deparse_unit, drop_units, install_unit, keep_units, load_units_xml, make_unit_label, make_units, mixed_units, remove_unit, scale_x_units, scale_y_units, set_units, ud_are_convertible, unitless, units_options, valid_udunits, valid_udunits_prefixes
Error: package ‘sf’ could not be loaded
In addition: Warning message:
S3 methods ‘[.mixed_units’, ‘[.units’, ‘[<-.units’, ‘[[.units’, ‘[[<-.units’, ‘units<-.logical’, ‘units<-.mixed_units’, ‘units<-.numeric’, ‘units<-.units’, ‘Math.units’, ‘Ops.mixed_units’, ‘Ops.symbolic_units’, ‘Ops.units’, ‘Summary.units’, ‘all.equal.units’, ‘anyDuplicated.units’, ‘as.Date.units’, ‘as.POSIXct.units’, ‘as.character.mixed_symbolic_units’, ‘as.character.symbolic_units’, ‘as.data.frame.units’, ‘as.list.units’, ‘as_units.Date’, ‘as_units.POSIXt’, ‘as_units.call’, ‘as_units.character’, ‘as_units.default’, ‘as_units.difftime’, ‘as_units.expression’, ‘as_units.mixed_units’, ‘as_units.name’, ‘as_units.symbolic_units’, ‘as_units.units’, ‘boxplot.units’, ‘c.mixed_units’, ‘c.units’, ‘diff.units’, ‘drop_units.data.frame’, ‘drop_units.mixed_units’, ‘drop_units.units’, ‘duplicated.units’, ‘format.mixed_units’, ‘format.units’, ‘hist.units’, ‘log10.units’, ‘log2.units’, ‘mean.units’, ‘median.units’, ‘mixed_units.numeric’, ‘mixed_units.units’, ‘plot.units’, ‘print.mixed_units’, ‘print. [... truncated]

**I've consulted help forums for tips, no luck. I've updated packages, tried to install the sf package in a variety of ways according to online forums that say they're supposed to resolve the above error problem, but no luck. I always get the same darn message. Does anyone out there with more R/computer programming competency than myself know what the issue is that's preventing me from being able to load spdep?

Thank you**

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions