Dear participants ,
I have problem in importing both xlsx and csv files.
It looks like this
tried with codes
install.packages("openxlsx")
library(openxlsx)
data=read.xlsx("C:/Users/d2009.xlsx",1)
and with csv
DATA2 = read.csv2("C:/Users/49151/Desktop/Master Thesis/dy2009.xlsx",header = T,
sep = ";",dec = ",")
however, in excel it looks like as in tables not like one line with ; as usual for csv.
can someone help ?
from pic <- after the semicolon the cell should end and -0 should be in next cell
If I had to guess, this looks like a semi-colon separated variable file, with decimal comma .
If you reproduce the first few lines of your CSV file here, that might be helpful.
Also, obligatory shoutout to ask this question as a markdown formatted (the little </>
button) with a reprex
(FAQ: What's a reproducible example (`reprex`) and how do I do one? )
Thank you @EconomiCurtis ,
but i just found my mistake,
when I run
DATA = read.csv("C:/Users/49151/Desktop/d2009.csv", header =TRUE,sep=";", dec="." , check.names=TRUE)
it worked.
Before I didin't include check.names=TRUE maybe thats why...
but thanks
system
Closed
May 24, 2019, 3:34pm
5
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.