File captaincy is not opening
Title
Question
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.
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")
Login to add comment
Login to add comment