In order to do my assignment on customer_churn dataset, it requires that have a cvs file of customer_churn in downloads and cope the path into read.csv() inside the brakets, then assign the customer_churn the name of customer_data.
Though I have installed the customer_churn into R script window. But cannot assign the new name customer_data to it.
Thanks friends I am able to copy path of customer_churn csv file from downloads!
Here is an example, with a file named grist.csv that is in my Desktop folder on an Ubuntu machine. With macOS or Windows, the path name will depend on local configuration. I use the read_csv function from {readr} but it work the same with read.csv.
name_of_object_in_R <- readr::read_csv("~/Desktop/grist.csv")
#> Rows: 3 Columns: 5
#> ── Column specification ────────────────────────────────────────────────────────
#> Delimiter: ","
#> chr (1): country
#> dbl (4): dog_2022, cat_2023, dog_2023, cat_2024
#>
#> ℹ Use `spec()` to retrieve the full column specification for this data.
#> ℹ Specify the column types or set `show_col_types = FALSE` to quiet this message.
name_of_object_in_R
#> # A tibble: 3 × 5
#> country dog_2022 cat_2023 dog_2023 cat_2024
#> <chr> <dbl> <dbl> <dbl> <dbl>
#> 1 Norway 1 4 7 2
#> 2 UK 2 5 8 2
#> 3 USA 3 6 9 2