Error in import, could not find function "import"

I am receiving an error message for import function error that I never received before. These are the important codes I am using :


birth_data_dictionary <-import("ccbf_data_dictionary_v2.3.3.xlsx")

death_data_dictionary <-import("ccdf_data_dictionary_v2.3.1.csv")

death_data <-import ("ccdf__20220101_20230814.csv", header=FALSE) ``

and this is the error message:

```birth_data <-import("ccbf__20220101_20230814.csv",header=FALSE)
Error in import("ccbf__20220101_20230814.csv", header = FALSE) : 
  could not find function "import" ```

`` birth_data_dictionary <-import("ccbf_data_dictionary_v2.3.3.xlsx")
Error in import("ccbf_data_dictionary_v2.3.3.xlsx") : 
  could not find function "import" ```

Hi @RUserious, are you sure that import is for R, maybe with a libraries is the way.
I know import for Py.

install.packages(readxl)
library(readxl)
birth_data_dictionary <-read_excel("ccbf_data_dictionary_v2.3.3.xlsx") # check the correct path

# For csv use a base function read.csv
death_data_dictionary <- read.csv("ccdf_data_dictionary_v2.3.1.csv")

I believe you want the {rio} package

install.packages("rio")
library(rio)

should do it.

This topic was automatically closed 42 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.