Here are the first few lines of the first R program I give to my students.


## FLH_Ch3

## First, name the working directory holding the file for the dataset
## For Windows users:
##             FLHdata = "C:/EPBI431/FLHdata"
## Note that these are forward slashes.
## Same as
##            FLHdata <- "C:/EPBI431/FLHdata"

## Here is what I use on my Mac:
FLHdata =
"/Users/ralphobrienCWRU_MBPro07/_AllDocsROBrienMBPro/teaching/EPBI431_09/FLHdata"

## Set the working directory
setwd(FLHdata)

## Read the data; in this case the values are separated by commas (.csv).
DIG200 = read.csv("DIG200.csv")

## What's in DIG200?
names(DIG200)  ## Verify that many names in this dataset could be improved.

-- 
Ralph O'Brien, PhD
Professor, Dept of Epidemiology and Biostatistics
Case Western Reserve University
Office: 216.368.1927
Cell: 216.312.3203

On Wed, Nov 4, 2009 at 9:13 PM, David Winsemius <dwinsemius@comcast.net>wrote:

>
> On Nov 4, 2009, at 6:07 PM, Ali S wrote:
>
>  I have used R in Windows, but am now trying it on a Mac. I am having
>> problems loading my data as I am not sure how the path names work. Here is
>> what I have tried and am getting errors with:
>>
>>
>> sfs2<-read.delim(“/Users/fj/Documents/Data/Analysis/student2.txt", header
>> = TRUE, sep = "\t")
>>
>
> I've already posted an example of "works" on the GUI version, but this is
> showing up as unmatched double-quotes on my Mail.app reader. All I can say
> is "death to smart-quotes", a programming abomination if I ever saw one.
>
> --
> David
> --
>
>
> David Winsemius, MD
> Heritage Laboratories
> West Hartford, CT
>
> _______________________________________________
> R-SIG-Mac mailing list
> R-SIG-Mac@stat.math.ethz.ch
> https://stat.ethz.ch/mailman/listinfo/r-sig-mac
>

	[[alternative HTML version deleted]]

