Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

04-data-structures-part1 doesn't mention operations with matrices #112

Closed
rgaiacs opened this issue May 15, 2016 · 9 comments
Closed

04-data-structures-part1 doesn't mention operations with matrices #112

rgaiacs opened this issue May 15, 2016 · 9 comments
Assignees
Milestone

Comments

@rgaiacs
Copy link
Contributor

rgaiacs commented May 15, 2016

When you say matrices I think in linear algebra. Right after you teach me how I can create one matrix in R I will want to know how I can execute linear algebra operations in R, e.g. sum and multiplication. But

> A <- matrix(c(1,2,3,4), ncol=2, nrow=2)
> x <- matrix(c(1,2), ncol=1, nrow=2)
> A
     [,1] [,2]
[1,]    1    3
[2,]    2    4
> x
     [,1]
[1,]    1
[2,]    2
> A * x
Error in A * x : non-conformable arrays

I think this should go into one challenge.

@naupaka naupaka added this to the Version 5.4 milestone May 16, 2016
@naupaka
Copy link
Member

naupaka commented May 16, 2016

Good idea @rgaiacs. I added this issue to the milestone for the Bug BBQ and hopefully someone will open a PR to resolve it.

@tomwright01 tomwright01 self-assigned this Jun 13, 2016
@tomwright01
Copy link
Contributor

This content really doesn't fit in 04-data-structures. Matrix multiplication is covered in 09-vectorisation. I suggest we close this issue.

@jrnold
Copy link
Contributor

jrnold commented Jun 13, 2016

Since operations of vectors are not discussed in 04-data-structures, I agree with @tomwright01 . However, why does the vectorisation lesson come so far after data structures? It seems like it should be the next lesson.

@gvdr
Copy link

gvdr commented Jun 13, 2016

Agreed on matrix operations. I would move the Matrix section above the data.frame, though, because data.frames are more general. What do you think?

@jrnold
Copy link
Contributor

jrnold commented Jun 13, 2016

Though if someone is completely new the current order may work well. You can introduce data frames as a general case. Then matrices as something less general: a table in which everything has to be the same type. Under the hood they are implemented very differently, but to the user that may be the easiest way to initially understand the difference.

@naupaka
Copy link
Member

naupaka commented Jun 16, 2016

It sounds like there is support for leaving it as is, so I'd like to close this issue unless anyone has strong objections? Currently, the content is covered in 09-vectorization, so the question as I understand it is about the proper placement of that content relative to content about data frames.

@tomwright01
Copy link
Contributor

I don't think there is any problem moving 09-vectorisation. The question is where to?

Obviously after 04-data structures, but we don't want to push creating graphs back too far. I suggest after "subsetting data" but then swap "control flow" and "creating graphics".

The final order would then be:

  1. Introduction to R and RStudio
  2. Project management with RStudio
  3. Seeking help
  4. Data structures
  5. Exploring Data Frames
  6. Subsetting data
  7. Vectorisation
  8. Creating publication quality graphics
  9. Control flow
  10. Functions explained
  11. Writing data
  12. Split-apply-combine
  13. Dataframe manipulation with dplyr
  14. Dataframe manipulation with tidyr
  15. Producing reports with knitr
  16. Best practices for writing good code

Feel free to close this though. Otherwise I can probably make these changes this afternoon.

@gvdr
Copy link

gvdr commented Jun 16, 2016

Oh, no, sorry, my point was not to move 09. Was to move the paragraph about matrices that is already within 04 above data frames. I see no reason to have it after data frames in that chapter: it does not use any of the concepts introduced for data frames, but relies only on vectors... I still think chapter 04 may take advantage of a reflowing.

@naupaka
Copy link
Member

naupaka commented Apr 29, 2017

Closing b/c of no activity and support for leaving order as-is.

@naupaka naupaka closed this as completed Apr 29, 2017
rgaiacs pushed a commit to rgaiacs/swc-r-novice-gapminder that referenced this issue May 6, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants