Hi It's the first time I use R on mac, before I used on Windows, so I can't have my data when I have the function : read.table, my file is maned : data1.txt Do I use another format for my file? And when I trie list.file I have this answer : character(0) but I know where my file is on my computer. If anybody can help me? Thanks Cl?mence
You should copy the exact command you used, but it appears that your working directory does not contain the file. Make sure you are in the correct directory with getwd() then change to the correct directory with setwd("directory where data1.txt is located") or select the file interactively with read.table(file.choose(), . . . .) ------------------------------------- David L Carlson Associate Professor of Anthropology Texas A&M University College Station, TX 77840-4352 -----Original Message----- From: r-help-bounces at r-project.org [mailto:r-help-bounces at r-project.org] On Behalf Of Clemence Germaine Sent: Monday, August 5, 2013 10:31 AM To: r-help at r-project.org Subject: [R] can't read a file Hi It's the first time I use R on mac, before I used on Windows, so I can't have my data when I have the function : read.table, my file is maned : data1.txt Do I use another format for my file? And when I trie list.file I have this answer : character(0) but I know where my file is on my computer. If anybody can help me? Thanks Cl?mence ______________________________________________ R-help at r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
No you don't need another format. read.table is the same on any operating system. What is your actual command and what error messages if any? It may be a path problem. John Kane Kingston ON Canada> -----Original Message----- > From: clemence.germaine at gmail.com > Sent: Mon, 5 Aug 2013 17:31:11 +0200 > To: r-help at r-project.org > Subject: [R] can't read a file > > Hi > > It's the first time I use R on mac, before I used on Windows, so I can't > have my data when I have the function : read.table, my file is maned : > data1.txt > Do I use another format for my file? > > And when I trie list.file I have this answer : character(0) but I know > where my file is on my computer. > > If anybody can help me? > > Thanks > > Cl?mence > ______________________________________________ > R-help at r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide > http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code.____________________________________________________________ FREE 3D MARINE AQUARIUM SCREENSAVER - Watch dolphins, sharks & orcas on your desktop!