Skip to content

Commit

Permalink
merging with master; fixing trivial conflict
Browse files Browse the repository at this point in the history
Merge branch 'master' into expr_creates_var_failure

Conflicts:
	R_Programming/Matrices_and_Data_Frames/customTests.R
  • Loading branch information
WilCrofter committed Jun 9, 2014
2 parents d1d5a14 + 1377882 commit 7049e4b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion R_Programming/Matrices_and_Data_Frames/customTests.R
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@

# Put custom tests in this file.

expr_creates_var <- function(correctName=NULL){
Expand Down Expand Up @@ -31,7 +32,6 @@ expr_creates_var <- function(correctName=NULL){
return(results$passed)
}


creates_val_identical_to <- function(correctExpr){
e <- get("e", parent.frame())
correctVal <- eval(parse(text=correctExpr), cleanEnv(e$snapshot))
Expand Down
2 changes: 1 addition & 1 deletion R_Programming/Matrices_and_Data_Frames/lesson
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@
- Class: cmd_question
Output: Now, look at the documentation for the matrix function and see if you can figure out how to create a matrix containing the same numbers (1-20) and dimensions (4 rows, 5 columns) by calling the matrix() function. Store the result in a variable called my_matrix2.
CorrectAnswer: my_matrix2 <- matrix(1:20, nrow=4, ncol=5)
AnswerTests: creates_val_identical_to('matrix(1:20, nrow=4, ncol=5)'); expr_creates_var('my_matrix2')
AnswerTests: calculates_same_value('matrix(1:20, nrow=4, ncol=5)'); expr_creates_var('my_matrix2')
Hint: Call the matrix() function with three arguments -- 1:20, the number of rows, and the number of columns. Be sure to specify arguments by their proper names and store the result in my_matrix2 (not in my_matrix).

- Class: cmd_question
Expand Down

0 comments on commit 7049e4b

Please sign in to comment.