Skip to content

Concept Taxonomy #198

@b4D8

Description

@b4D8

Hi,

I'd like to offer my contribution to the R track by providing a few concepts.
I didn't see any reference to a roadmap related to this matter.
Is there a concept taxonomy being worked on by anyone?

Here's a first draft of one I've been working on:

slug name blurb prerequisite covers priority
objects R Objects Objects are R fundamental entities general intro, the assignment operator and naming things 1
atomic-vectors Atomic Vectors All Values are Vectors objects length(), scalar and empty vectors, positional subsetting with [i], c(), seq() 2
logical-type Logical Data Type Using Booleans with Logical Vectors atomic-vectors logical constants (TRUE, FALSE), comparison operators and basic logical operators (&, I, !), create with logical(), coerce with as.(), check with is.() 3
numeric-mode Numeric Data Type Using Integers and Floats with Numeric Vectors logical-type integer and double types, L suffix, 32 bits constraint, numeric constants (pi, Inf), arithmetic operators, recycling, ":" 4
character-type Character Data Type Using Strings with Character Vectors numeric-mode basic string manipulation, nchar(), maybe strsplit(), character constants (letters, LETTERS etc.) 5
missing-value Missing Value Dealing with Missing Values character-type NA (maybe NaN), NULL, is.na(), is.null(), the na.rm argument 6
names-attribute Attributes and Names Naming things is hard missing-value attributes(), attr(), names(), subsetting with ["name"] 8
functions Functions Let’s do stuff and automate it names-attribute arguments, named arguments, formals, body, return keyword, "…" 7
class-attribute Classes R has one of the most flexible class system functions class(), unclass(), generic functions (S3) and method dispatch, special double dispatch for grouped generic functions 14
conditions Conditions Control your code execution with if statements names-attribute If, else, lazy evaluation with && and ||, xor(), precedence, identical(), all(), any() 9
iterations Iterations Repetitive code execution with loops conditions for, in, seq_along(), while, repeat, next, break 10
exceptions Exceptions Handling errors and recovering functions stop(), stopifnot(), warning(), try() 15
factors Factors Integer representation or characters missing-value ordered and unordered factors, levels attribute, stringsAsFactors argument, maybe cut() 19
dim-attribute Dimensions Dimensions of an Object names-attribute array, matrix, subsetting with [i, j, k], dimnames attribute 20
switch Switch Select One of a List of Alternatives missing-value on character or numeric expressions 18
lists Lists Lists are Recursive Vectors atomic-vectors subsetting with [[ and $ 11
tabular-data Tabular Data Lists superpowers lists, class-attribute data.frame, row.names attribute, cbind(), rbind(), subsetting with [row, col] 12
selection Subsetting Chirurgical operations tabular-data Summary of [, [[, $ , sort(), order(), which() and %in% for subsetting 13
apply-functions Apply Functions Family Apply functions are here to help you vectorize your code functions, iterations, lists lapply, sapply, vapply etc. 16
regex-functions Regex Functions Family Pattern Matching and Replacement functions grep(), grepl(), regexpr(), gregexpr(), regexec(), gregexec(), sub(), gsub() maybe stringr:: 17
raw-type Raw Data Type Store raw bytes character-type strtoi(), charToRaw() - there’s actual use case in exercises so it might deserve higher priority but seems somewhat advanced 22
environments Environments Lexical and Dynamic Scoping functions current, global, closure, <<-, namespace 21

Additional concepts that could also be introduced:

  • pipes (base R and magrittr)
  • maps (purrr)

I don't really know at what point I would be a good idea to introduce recursion (functions, lists, iterations...).

Of course this is all work in progress and need much more thoughts, but I'd like to have your feedback before I look further into this (on the concepts themselves - definition, scope and order, as well as the method as I'm new to Exercism)

Major references:

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions