Hi
I am a beginner with R.
I have been trying to import a tab delimited excel file but i get the
following error message
> file.show('C:\Documents and
Settings\stats\Desktop\SUMI\plasma2.txt')
Warning message:
file.show(): file 'C:Documents and SettingsstatsDesktopSUMIplasma2.txt'
does not exist
I have understood the programming part but i cannot go ahead unless i have
imported the file. I have consulted the R-help archive without success.
Any help will be appreciated
Thanks in advance
---------------------------------
[[alternative HTML version deleted]]
Rashmi Pant wrote:> Hi > I am a beginner with R. > I have been trying to import a tab delimited excel file but i get the following error messageTab delimited is not Excel.> > file.show('C:\Documents and Settings\stats\Desktop\SUMI\plasma2.txt')See R for Windows FAQ "R can't find my file, but I know it is there!" Uwe Ligges> Warning message: > file.show(): file 'C:Documents and SettingsstatsDesktopSUMIplasma2.txt' does not exist > I have understood the programming part but i cannot go ahead unless i have imported the file. I have consulted the R-help archive without success. > Any help will be appreciated > Thanks in advance > > > --------------------------------- > > [[alternative HTML version deleted]] > > ______________________________________________ > R-help at stat.math.ethz.ch mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
if you don't need to import several dataset, you can directly change current
directory from the file
menu and move to your working directory instead of substuting all backslashes
for slashes in import
function argument.
you can also copy your dataset in excel and do :
> data1 <- read.delim("clipboard")
-------------------------------------------------------------------
Jacques VESLOT
CNRS UMR 8090
I.B.L (2?me ?tage)
1 rue du Professeur Calmette
B.P. 245
59019 Lille Cedex
Tel : 33 (0)3.20.87.10.44
Fax : 33 (0)3.20.87.10.31
http://www-good.ibl.fr
-------------------------------------------------------------------
Rashmi Pant a ?crit :> Hi
> I am a beginner with R.
> I have been trying to import a tab delimited excel file but i get the
following error message
> > file.show('C:\Documents and
Settings\stats\Desktop\SUMI\plasma2.txt')
> Warning message:
> file.show(): file 'C:Documents and
SettingsstatsDesktopSUMIplasma2.txt' does not exist
> I have understood the programming part but i cannot go ahead unless i have
imported the file. I have consulted the R-help archive without success.
> Any help will be appreciated
> Thanks in advance
>
>
> ---------------------------------
>
> [[alternative HTML version deleted]]
>
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide!
http://www.R-project.org/posting-guide.html
>
On 7/4/2006 2:22 AM, Rashmi Pant wrote:> Hi > I am a beginner with R. > I have been trying to import a tab delimited excel file but i get the following error message > > file.show('C:\Documents and Settings\stats\Desktop\SUMI\plasma2.txt')R treats backslashes ("\") as escape characters. It's easier just to use forward slashes, i.e. c:/Documents..., and easiest of all is to use the function file.choose() which pops up a file selection dialog. Duncan Murdoch> Warning message: > file.show(): file 'C:Documents and SettingsstatsDesktopSUMIplasma2.txt' does not exist > I have understood the programming part but i cannot go ahead unless i have imported the file. I have consulted the R-help archive without success. > Any help will be appreciated > Thanks in advance > > > --------------------------------- > > [[alternative HTML version deleted]] > > ______________________________________________ > R-help at stat.math.ethz.ch mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Rashmi,
I suggest you store the file as a comma separated file (.CSV). You can
import a .csv file using the read.csv function
data<-read.csv("d:\\myfile.csvl")
I suggest you look at the help file for read.csv, i.e.
help(read.csv)
John
John Sorkin M.D., Ph.D.
Chief, Biostatistics and Informatics
Baltimore VA Medical Center GRECC,
University of Maryland School of Medicine Claude D. Pepper OAIC,
University of Maryland Clinical Nutrition Research Unit, and
Baltimore VA Center Stroke of Excellence
University of Maryland School of Medicine
Division of Gerontology
Baltimore VA Medical Center
10 North Greene Street
GRECC (BT/18/GR)
Baltimore, MD 21201-1524
410-605-7119
jsorkin at grecc.umaryland.edu
>>> Rashmi Pant <rashmi6380 at yahoo.co.uk> 07/04/06 2:22 AM
>>>
Hi
I am a beginner with R.
I have been trying to import a tab delimited excel file but i get the
following error message
> file.show('C:\Documents and
Settings\stats\Desktop\SUMI\plasma2.txt')
Warning message:
file.show(): file 'C:Documents and SettingsstatsDesktopSUMIplasma2.txt'
does not exist
I have understood the programming part but i cannot go ahead unless i
have imported the file. I have consulted the R-help archive without
success.
Any help will be appreciated
Thanks in advance
---------------------------------
[[alternative HTML version deleted]]
______________________________________________
R-help at stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide!
http://www.R-project.org/posting-guide.html