Object classes in R
@LorenzoBertola presents Object classes in R How to fix one of the most frustrating error messages in R (Data Structures - Part 4) --CHAT-- 00:22:48 Kevin Bairos-Novak [JCU]: can the object be named ‘cool_kids’ instead of x? ;P 00:22:57 Legana Fingerhut: lol 00:26:45 Kevin Bairos-Novak [JCU]: I just realized - factor might be the 6th type of element; but it’s very similar to character so not super different! 00:28:30 Legana Fingerhut: But useful for plotting :) because you can reorganise the levels ! 00:31:17 Ronal: yes all good 00:36:15 Kevin Bairos-Novak [JCU]: is() 00:36:36 Legana Fingerhut: I always use str() 00:37:25 Jacob: me too Legana 00:37:34 Jacob: great minds 00:37:43 Legana Fingerhut: 🤩 00:43:04 Kevin Bairos-Novak [JCU]: If anyone has any questions about how to access elements in a list, I think it is covered more during next week’s presentation as well! 00:43:17 Kevin Bairos-Novak [JCU]: On subsetting 00:44:38 Kevin Bairos-Novak [JCU]: Oy 00:44:54 Kevin Bairos-Novak [JCU]: You misspelled ‘Kevin’ ;P 00:45:21 Legana Fingerhut: Does that mean I have to shave my head? 00:45:33 Kevin Bairos-Novak [JCU]: I think so 00:46:12 Legana Fingerhut: I will add it to my to_do list … (yes that was a terrible pun because we are talking about adding things to a list) 00:46:40 Kevin Bairos-Novak [JCU]: Amazing haha. No such thing as a terrible pun - they only get funnier with how bad they are ;P 00:47:00 Legana Fingerhut: 😅 00:47:55 Kevin Bairos-Novak [JCU]: To summarize: vectors (n x 1 dimensions), matrices (n x m dimensions) and arrays (n x m x p or higher dimensions) all have to have the same data type inside; whereas data frames (n x m) and lists (n x … really any dimensions you like!) can have columns with different data types. So data frames/lists are usually the most commonly used because they are so versatile and easier to visualize when you print them. Matrices and arrays are better for mathematical functions (like matrix multiplication) 00:48:28 Legana Fingerhut: #tibblesforever 00:48:59 Kevin Bairos-Novak [JCU]: Shush you #tidyfanatic xD 00:49:19 Legana Fingerhut: 🤪 00:50:51 Kevin Bairos-Novak [JCU]: Sorry Lorenzo haha 00:59:34 Legana Fingerhut: Why do I get the lowest number? 01:01:07 Jacob: one question, what is a factor 01:02:07 4: Factors are the data objects which are used to categorize the data and store it as levels. They can store both strings and integers. They are useful in the columns which have a limited number of unique values. Like "Male, "Female" and True, False etc 01:03:12 4: From Tutorial about factors: https://www.tutorialspoint.com/r/r_factors.htm 01:03:29 Kevin Bairos-Novak [JCU]: R automatically decides the order as alphabetical order, but you can rearrange these to plot them differently (will come in handy when we get to the ggplot2 section ;) 01:10:59 Lorenzo Bertola: https://www.jcu.edu.au/information-and-communications-technology/help-and-support/it-help-desk 01:13:32 Ronal: Thanks for the workshop guys! bye! 01:13:38 Legana: Bye Ronal! 01:14:55 Lorenzo Bertola: Bye Ronal! 01:15:54 Tory Stoddard: Thank you guys! 01:16:06 Lorenzo Bertola: No worries Tory, hope it was clear 01:21:14 Lorenzo Bertola: I think that’s a good idea
Download
0 formatsNo download links available.