Dr Nisha Arora
Dr Nisha Arora

Reputation: 738

To load excel file in R/ R studio

My questions are:

I am able to read the file using read.csv but read.table gives me an error. I've also tried the following codes, but failed to read the file:

read.table("hw1_data R programming.xlsx", header = TRUE, sep = ",")

read.table("hw1_data R programming.xlsx", sep = ",")

read.table("hw1_data R programming.xlsx", header = TRUE, sep = ",",fileEncoding='UCS-2LE')

How can I use read.table?

Upvotes: 0

Views: 1105

Answers (1)

user25494
user25494

Reputation: 1371

Try...

install.packages("readxl")
library(readxl)
hw1 <- read_excel("hw1_data R programming.xlsx")

Upvotes: 2

Related Questions