-4
$\begingroup$

Heloo,

pleas help me

How to read files (text and excell) into R ?

pleas write full instruction.

Thank for help

$\endgroup$
2
  • $\begingroup$ Did you try to read the manual? $\endgroup$
    – mpiktas
    Commented May 28, 2012 at 14:18
  • 3
    $\begingroup$ I am downvoting, since this is a easily googlable question and it does not conform to guidelines in FAQ. $\endgroup$
    – mpiktas
    Commented May 28, 2012 at 14:20

1 Answer 1

2
$\begingroup$

You could try out read.table or read.csv http://stat.ethz.ch/R-manual/R-devel/library/utils/html/read.table.html is the link to the R manual.

The important specification parameters include whether the file contains headers (head = T in case file contains headers), the separator specification - sep = "," for a csv file would work well. The specification on how to handle missing strings is by the na.strings parameter.

say the variable filename contains the full path to the csv file then

Eg: read.table(filename, head = T, sep = ",", na.strings = "") would readin a csv file with headers and replace the missing fields with blanks

$\endgroup$

Not the answer you're looking for? Browse other questions tagged or ask your own question.