Cannot find function after loading library R

124 Views Asked by At

Im having some troubles with the startsWith function in R.

After an update of the library gdata that contains the function, this test script gives an error:

library(data.table)
library(gdata)

help.search("startsWith");

print(startsWith("test","t"));

I also tried to use gdata::startsWith("test","t") or gdata:::startsWith("test","t") but nothing chages.

The error I get is the following:

Error in get(name, envir = ns, inherits = FALSE) : 
  oggetto "startsWith" non trovato
Calls: print -> <Anonymous> -> :: -> getExportedValue -> get

While the search part finds the function startsWith, returning this message:

gdata: read.xls support for 'XLS' (Excel 97-2004) files ENABLED.

gdata: read.xls support for 'XLSX' (Excel 2007+) files ENABLED.

Attaching package: ‘gdata’

The following objects are masked from ‘package:data.table’:

    first, last

The following object is masked from ‘package:stats’:

    nobs

The following object is masked from ‘package:utils’:

    object.size

Help files with alias or concept or title matching ‘startsWith’ using
fuzzy matching:


dplyr::reexports        Objects exported from other packages
  Aliases: starts_with
gdata::startsWith       Determine if a character string "starts with"
                        with the specified characters.
  Aliases: startsWith
tidyselect::select_helpers
                        Select helpers
  Aliases: starts_with


Type '?PKG::FOO' to inspect entries 'PKG::FOO', or 'TYPE?PKG::FOO' for
entries like 'PKG::FOO-TYPE'.

Do you have any suggestion on how to solve this issue? (I already tried to remove and install the library again).

Thank you in advance.

0

There are 0 best solutions below