installation of package csv file

i am having problem in install.packages("hotel_bookings.csv")
help me in this problem

The install.packages() function is not used for reading csv files. It is used for installing packages of functions. Try

DF <- read.csv("hotel_bookings.csv")

If that does not work, please explain more about what you are trying to do.

1 Like

https://d3c33hcgiwev3.cloudfront.net/algvdUHgT7iYL3VB4B-49g_f8ffabe1fac842d6872cca560da7c9f1_Lesson2_GGPlot.Rmd?Expires=1674950400&Signature=eVbIE29qxWaD7c0nG3JDLQ33H62s~s-rGYDyWgBGbGQJjvuDEOS6If7XYABMgEEz0YFMBYIaJQ0OIRQWa3Z03tFgfZ9eZ0PKdqNoeMJHrOZhSg2aAtIu1xQAbGcMRQZsqHrRXT6rmrU2Z67MOn11UXH86uFBciqsZGVOiFsnyWI_&Key-Pair-Id=APKAJLTNE6QMUY6HBC5A
i am learning course on coursera and there is hand on activity regarding ggplot2 here is the link above mentioned

https://d3c33hcgiwev3.cloudfront.net/GL0bk8O2Sja9G5PDtko2uQ_31e445d7ca64417eb45aeaa08ec90bf1_hotel_bookings.csv?Expires=1674950400&Signature=VfzQ1K7arTaWuoZFOL-hvLtk53Al35nJJ9CmK4ZUjqfrkpbs0wECQ2n8gw4FNQE6ktbvgS1iD50~ht43NJAkqfTu7xKJkq7stBNMvTDUCImmcKe~u60gBYku~uFjG8ERMnXxrKG6k3EGkiJBWgflMsp8vtdzW0XQ26uq1KnUhAM_&Key-Pair-Id=APKAJLTNE6QMUY6HBC5A

d <- read.csv("https://d3c33hcgiwev3.cloudfront.net/GL0bk8O2Sja9G5PDtko2uQ_31e445d7ca64417eb45aeaa08ec90bf1_hotel_bookings.csv?Expires=1674950400&Signature=VfzQ1K7arTaWuoZFOL-hvLtk53Al35nJJ9CmK4ZUjqfrkpbs0wECQ2n8gw4FNQE6ktbvgS1iD50~ht43NJAkqfTu7xKJkq7stBNMvTDUCImmcKe~u60gBYku~uFjG8ERMnXxrKG6k3EGkiJBWgflMsp8vtdzW0XQ26uq1KnUhAM_&Key-Pair-Id=APKAJLTNE6QMUY6HBC5A")
d |> head()
#>          hotel is_canceled lead_time arrival_date_year arrival_date_month
#> 1 Resort Hotel           0       342              2015               July
#> 2 Resort Hotel           0       737              2015               July
#> 3 Resort Hotel           0         7              2015               July
#> 4 Resort Hotel           0        13              2015               July
#> 5 Resort Hotel           0        14              2015               July
#> 6 Resort Hotel           0        14              2015               July
#>   arrival_date_week_number arrival_date_day_of_month stays_in_weekend_nights
#> 1                       27                         1                       0
#> 2                       27                         1                       0
#> 3                       27                         1                       0
#> 4                       27                         1                       0
#> 5                       27                         1                       0
#> 6                       27                         1                       0
#>   stays_in_week_nights adults children babies meal country market_segment
#> 1                    0      2        0      0   BB     PRT         Direct
#> 2                    0      2        0      0   BB     PRT         Direct
#> 3                    1      1        0      0   BB     GBR         Direct
#> 4                    1      1        0      0   BB     GBR      Corporate
#> 5                    2      2        0      0   BB     GBR      Online TA
#> 6                    2      2        0      0   BB     GBR      Online TA
#>   distribution_channel is_repeated_guest previous_cancellations
#> 1               Direct                 0                      0
#> 2               Direct                 0                      0
#> 3               Direct                 0                      0
#> 4            Corporate                 0                      0
#> 5                TA/TO                 0                      0
#> 6                TA/TO                 0                      0
#>   previous_bookings_not_canceled reserved_room_type assigned_room_type
#> 1                              0                  C                  C
#> 2                              0                  C                  C
#> 3                              0                  A                  C
#> 4                              0                  A                  A
#> 5                              0                  A                  A
#> 6                              0                  A                  A
#>   booking_changes deposit_type agent company days_in_waiting_list customer_type
#> 1               3   No Deposit  NULL    NULL                    0     Transient
#> 2               4   No Deposit  NULL    NULL                    0     Transient
#> 3               0   No Deposit  NULL    NULL                    0     Transient
#> 4               0   No Deposit   304    NULL                    0     Transient
#> 5               0   No Deposit   240    NULL                    0     Transient
#> 6               0   No Deposit   240    NULL                    0     Transient
#>   adr required_car_parking_spaces total_of_special_requests reservation_status
#> 1   0                           0                         0          Check-Out
#> 2   0                           0                         0          Check-Out
#> 3  75                           0                         0          Check-Out
#> 4  75                           0                         0          Check-Out
#> 5  98                           0                         1          Check-Out
#> 6  98                           0                         1          Check-Out
#>   reservation_status_date
#> 1              2015-07-01
#> 2              2015-07-01
#> 3              2015-07-02
#> 4              2015-07-02
#> 5              2015-07-03
#> 6              2015-07-03

Created on 2023-01-27 with reprex v2.0.2

1 Like

This topic was automatically closed 21 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.