File captaincy is not opening
source('C:/Users/Joohi/Desktop/My Project/Matrices/myMatrix.R', echo=TRUE)
> # Clear R workspace
> rm(list = ls() )
> # Declare a variable to read and store the data frame
> captaincy = read.csv("CaptaincyData.csv")
Error in file(file, "rt") : cannot open the connection
In addition: Warning message:
In file(file, "rt") :
cannot open file 'CaptaincyData.csv': No such file or directory
> # Clear R workspace
> rm(list = ls() )
>
> # Declare a variable to read and store the data frame
> captaincy = read.csv("CaptaincyData.csv")
Error in file(file, "rt") : cannot open the connection
In addition: Warning message:
In file(file, "rt") :
cannot open file 'CaptaincyData.csv': No such file or directory
>
> # View the stored data frame
> View(captaincy)
Error in View : object 'captaincy' not found
> CaptaincyData <- read.csv("C:/Users/Joohi/Desktop/My Project/Matrices/CaptaincyData.csv")
> View(CaptaincyData)
> # Clear R workspace
> rm(list = ls() )
>
> # Declare a variable to read and store the data frame
> captaincy = read.csv("CaptaincyData.csv")
Error in file(file, "rt") : cannot open the connection
In addition: Warning message:
In file(file, "rt") :
cannot open file 'CaptaincyData.csv': No such file or directory
>
> # View the stored data frame
> View(captaincy)
Error in View : object 'captaincy' not found
> # Clear R workspace
> rm(list = ls() )
>
> # Declare a variable to read and store the data frame
> captaincy = read.csv("CaptaincyData.csv")
Error in file(file, "rt") : cannot open the connection
In addition: Warning message:
In file(file, "rt") :
cannot open file 'CaptaincyData.csv': No such file or directory
>
> # View the stored data frame
> View(captaincy)
Error in View : object 'captaincy' not found
> # Declare a variable to read and store the data frame
> captaincy = read.csv("CaptaincyData.csv")
Error in file(file, "rt") : cannot open the connection
In addition: Warning message:
In file(file, "rt") :
cannot open file 'CaptaincyData.csv': No such file or directory
>
> # View the stored data frame
> View(captaincy)
Error in View : object 'captaincy' not found
>
R Operations-on-Matrices-and-Data-Frames 01-02 min 10-20 sec
Answers:
Make sure that the file 'CaptaincyData.csv' is stored in your working directory. Check your current working directory using the command 'getwd()' and then check if 'CaptaincyData.csv' is stored there or not. It seems from the above messages that 'CaptaincyData.csv' is not present in your working directory.
Please also remember to make a copy of this file and use your own copy - this will make sure that you have extracted the file correctly.
28-01-21, 11:16 a.m.
kannan
If we are applying some commands on iris how does it run then .Iris is not present in our working directory too .
How to add a dataset as an inbuilt dataset ?
Use the "data()" function of R to load a built-in data sets. Example: data("iris")