rpietro / airwayDehiscence

Airway dehiscence project using the UNOS database
0 stars 0 forks source link

Importing data #3

Closed acastleberry closed 12 years ago

acastleberry commented 12 years ago

So if my data import worked properly, what should I see when I run the following?

head(airwayDehiscence) str(airwayDehiscence) names(airwayDehiscence) summary(airwayDehiscence)

attach(airwayDehiscence)

How do I view the spreadsheet? Is there a way I can verify that it was able to find my path and import the file correctly?

rpietro commented 12 years ago

answering:

head(airwayDehiscence) - will show you the first few rows

str(airwayDehiscence) -- will give you a list of variables, their class (type of variable) and some examples of values within that variable

names(airwayDehiscence) -- will give you the names of the variables

summary(airwayDehiscence) -- will give you a rough summary of each variable

attach(airwayDehiscence) -- this simply attaches the data set, see ?attach for a more detailed explanation. actually, running ?command will always give you more details about each of the commands above

How do I view the spreadsheet? - View(airwayDehiscence) # couple details: functions are case sensitive and View starts with a capital letter (I always make this mistake), airwayDehiscence is just the object where you put all the data, if you had put it under an object called duke you would use duke throughout. of course it's always good practice to use meaningful names that will help you remember what the object contains

Is there a way I can verify that it was able to find my path and import the file correctly? -- if you didn't get an error that's a good sign. using View will ensure that everything is in there -- looking at the data in a sheet format is always a good idea, can save you hours -- but head and all the other commands that give you a glimpse of the data are also helpful. in a full analysis after you import the data you usually generate a ton of graphics for each variable -- later on we will have templates for this so that we can do everything in a standardized format. main principle is to never start modeling unless you are absolutely confident that you know the data (missing, outliers, miscoding) -- reality is that one can get very weird results if the data is not clean

On Mon, Jun 11, 2012 at 10:35 PM, acastleberry < reply@reply.github.com

wrote:

So if my data import worked properly, what should I see when I run the following?

head(airwayDehiscence) str(airwayDehiscence) names(airwayDehiscence) summary(airwayDehiscence)

attach(airwayDehiscence)

How do I view the spreadsheet? Is there a way I can verify that it was able to find my path and import the file correctly?


Reply to this email directly or view it on GitHub: https://github.com/rpietro/airwayDehiscence/issues/3