Created
November 26, 2010 03:43
Revisions
-
prasoonsharma revised this gist
Dec 2, 2010 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -9,7 +9,7 @@ age <- 25 # Numeric hourly_wage <- 27.25 # Factor: Categorical variables (take on a limited number of different values). Similar to lookups in Excel/databases office <- factor("NYO", levels = c("NYO", "MUM", "SYD")) # Boolean -
prasoonsharma revised this gist
Nov 27, 2010 . 1 changed file with 2 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -28,6 +28,8 @@ time.till.retirement <- 60 - age # Numeric weekly.compensation <- 40 * hourly_wage round(hourly_wage, 1) # absolute abs(-39 + 10) # Boolean has.kids <- TRUE -
prasoonsharma revised this gist
Nov 27, 2010 . 1 changed file with 1 addition and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -27,6 +27,7 @@ time.till.retirement <- 60 - age # Numeric weekly.compensation <- 40 * hourly_wage round(hourly_wage, 1) # Boolean has.kids <- TRUE -
prasoonsharma revised this gist
Nov 26, 2010 . 1 changed file with 5 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -30,4 +30,9 @@ weekly.compensation <- 40 * hourly_wage # Boolean has.kids <- TRUE # AND married && has.kids # OR married || has.kids # NOT ! married -
prasoonsharma revised this gist
Nov 26, 2010 . 1 changed file with 21 additions and 4 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,16 +1,33 @@ # ATOMIC DATA TYPES IN R # Character first.name <- "Kirk" # Integer age <- 25 # Numeric hourly_wage <- 27.25 # Factor office <- factor("NYO", levels = c("NYO", "MUM", "SYD")) # Boolean married <- TRUE # OPERATIONS ON ATOMIC TYPES # Character last.name <- "Davis" full.name <- paste(first.name, last.name) # Integer time.till.retirement <- 60 - age # Numeric weekly.compensation <- 40 * hourly_wage # Boolean has.kids <- TRUE married && has.kids -
prasoonsharma revised this gist
Nov 26, 2010 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,4 +1,4 @@ # ATOMIC DATA TYPES IN R # Character name <- "Kirk" -
prasoonsharma created this gist
Nov 26, 2010 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,16 @@ # Atomic data types in R # Character name <- "Kirk" # Integer data type age <- 25 # Numeric data type hourly_wage <- 27.25 # Factor office <- factor("NYO", levels = c("NYO", "MUM", "SYD")) # Boolean married <- TRUE