Platform: x86 64-w64-mingw32/x64 (64-bit)



Download 14.23 Kb.
Date16.03.2022
Size14.23 Kb.
#87201
console






R version 4.1.2 (2021-11-01) -- "Bird Hippie"
Copyright (C) 2021 The R Foundation for Statistical Computing
Platform: x86_64-w64-mingw32/x64 (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.


You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

R is a collaborative project with many contributors.


Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or


'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

> library(readr)


> datafile1 <- read.fwf("C:/Users/Arpit Beniwal/Desktop/R_Exam/datafile1.txt", widths =c(2,3,2),
+ header=FLASE,
+ col.names=c("statecode","sr","imr"))
Error in read.fwf("C:/Users/Arpit Beniwal/Desktop/R_Exam/datafile1.txt", :
object 'FLASE' not found
> View(datafile1)
Error in View : object 'datafile1' not found
> library(readr)
> datafile1 <- read_csv("C:/Users/Arpit Beniwal/Desktop/R_Exam/datafile1.txt",
+ col_names = FALSE)
Rows: 28 Columns: 1
-- Column specification -----------------------------------------------------------------------
Delimiter: ","
chr (1): X1

i Use `spec()` to retrieve the full column specification for this data.


i Specify the column types or set `show_col_types = FALSE` to quiet this message.
> View(datafile1)
> library(readxl)
> datafile2 <- read_excel("C:/Users/Arpit Beniwal/Desktop/R_Exam/datafile2.xlsx")
> View(datafile2)
>
> library(readxl)
> datafile3 <- read_excel("C:/Users/Arpit Beniwal/Desktop/R_Exam/datafile3.xlsx")
> View(datafile3)
> joined_data <- datafile1%>%
+ full_join(datafile2, by=C("statecode"))
Error in datafile1 %>% full_join(datafile2, by = C("statecode")) :
could not find function "%>%"
>
> joined_data2 <- joined_data %>%
+ full_join(datafile3, by="statecode")
Error in joined_data %>% full_join(datafile3, by = "statecode") :
could not find function "%>%"
>
> maindata <- joined_data2 %>%
+ select(1:11,var5)
Error in joined_data2 %>% select(1:11, var5) :
could not find function "%>%"
>
> finaldata<_ joined_data2 %>%
Error: unexpected input in "finaldata<_"
> select (statecode,sr,imr,state.x,population,literacyrate,popdensity,birthrate,deathrate,var5)
Error in select(statecode, sr, imr, state.x, population, literacyrate, :
could not find function "select"
Download 14.23 Kb.

Share with your friends:




The database is protected by copyright ©sckool.org 2022
send message

    Main page