Kirjailijakuva
17 teosta 45 jäsentä 6 arvostelua

Tekijän teokset

The Beginner's Guide to Todoist (2019) 2 kappaletta

Merkitty avainsanalla

Yleistieto

Sukupuoli
male
Kansalaisuus
Denmark

Jäseniä

Kirja-arvosteluja

Indeholder "About the Author", "About the Technical Reviewer", "Acknowledgments", "Chapter 1: Introduction", "Chapter 2: Functions in R", " Writing Functions in R", " Named Parameters and Default Parameters", " The "Gobble Up Everything Else" Parameter: "..."", " Lazy Evaluation", " Functions Don't Have Names", " Vectorized Functions", " Infix Operators", " Replacement Functions", "Chapter 3: Pure Functional Programming", " Writing Pure Functions", " Recursion As Loops", " The Structure of a Recursive Function", " Tail-Recursion", " Runtime Considerations", "Chapter 4: Scope and Closures", " Environments and Functions", " Environment Chains, Scope, and Function Calls", " Scopes, Lazy Evaluation, and Default Parameters", " Nested Functions and Scopes", " Closures", " Reaching Outside Your Innermost Scope", " Lexical and Dynamic Scope", "Chapter 5: Higher-Order Functions", " Currying", " A Parameter Binding Function", " Continuation-Passing Style", " Thunks and Trampolines", "Chapter 6: Filter, Map, and Reduce", " The General Sequence Object in R Is a List", " Filtering Sequences", " Mapping over Sequences", " Reducing Sequences", " Bringing the Functions Together", " The Apply Family of Functions", " sapply, vapply, and lapply", " The apply Function", " The tapply Function", " Functional Programming in purrr", " Filter-like Functions", " Map-like Functions", " Reduce-like Functions", "Chapter 7: Point-Free Programming", " Function Composition", " Pipelines", "Chapter 8: Conclusions", "Index".

R er en efterkommer af Lisp, så lister er motoren i alting.
… (lisätietoja)
 
Merkitty asiattomaksi
bnielsen | Oct 4, 2023 |
Indeholder "About the Author", "About the Technical Reviewer", "Acknowledgments", "Introduction", "Chapter 1: Introduction to R Programming", " Basic Interaction with R", " Using R As a Calculator", " Simple Expressions", " Assignments", " Indexing Vectors", " Vectorized Expressions", " Comments", " Functions", " Getting Documentation for Functions", " Writing Your Own Functions", " Summarizing and Vector Functions", " A Quick Look at Control Flow", " Factors", " Data Frames", " Using R Packages", " Dealing with Missing Values", " Data Pipelines", " Writing Pipelines of Function Calls", " Writing Functions That Work with Pipelines", " The Magical "." Argument", " Other Pipeline Operations", " Coding and Naming Conventions", " Exercises", " Mean of Positive Values", " Root Mean Square Error", "Chapter 2: Reproducible Analysis", " Literate Programming and Integration of Workflow and Documentation", " Creating an R Markdown/knitr Document in RStudio", " The YAML Language", " The Markdown Language", " Formatting Text", " Cross-Referencing", " Bibliographies", " Controlling the Output (Templates/Stylesheets)", " Running R Code in Markdown Documents", " Using chunks when analyzing data (without compiling documents)", " Caching Results", " Displaying Data", " Exercises", " Create an R Markdown Document", " Different Output", " Caching", "Chapter 3: Data Manipulation", " Data Already in R", " Quickly Reviewing Data", " Reading Data", " Examples of Reading and Formatting Data Sets", " Breast Cancer Data set", " Boston Housing Data Set", " The readr Package", " Manipulating Data with dplyr", " Some Useful dplyr Functions", " Breast Cancer Data Manipulation", " Tidying Data with tidyr", " Exercises", " Importing Data", " Using dplyr", " Using tidyr", "Chapter 4: Visualizing Data", " Basic Graphics", " The Grammar of Graphics and the ggplot2 Package", " Using qplot()", " Using Geometries", " Facets", " Scaling", " Themes and Other Graphics Transformations", " Figures with Multiple Plots", " Exercises", "Chapter 5: Working with Large Data Sets", " Subsample Your Data Before You Analyze the Full Data Set", " Running Out of Memory During an Analysis", " Too Large to Plot", " Too Slow to Analyze", " Too Large to Load", " Exercises", " Subsampling", " Hex and 2D Density Plots", "Chapter 6: Supervised Learning", " Machine Learning", " Supervised Learning", " Regression vs. Classification", " Inference vs. Prediction", " Specifying Models", " Linear Regression", " Logistic Regression (Classification, Really)", " Model Matrices and Formula", " Validating Models", " Evaluating Regression Models", " Evaluating Classification Models", " Confusion Matrix", " Accuracy", " Sensitivity and Specificity", " Other Measures", " More Than Two Classes", " Sampling Approaches", " Random Permutations of Your Data", " Cross-Validation", " Selecting Random Training and Testing Data", " Examples of Supervised Learning Packages", " Decision Trees", " Random Forests", " Neural Networks", " Support Vector Machines", " Naive Bayes", " Exercises", " Fitting Polynomials", " Evaluating Different Classification Measures", " Breast Cancer Classification", " Leave-One-Out Cross-Validation (Slightly More Difficult)", " Decision Trees", " Random Forests", " Neural Networks", " Support Vector Machines", " Compare Classification Algorithms", "Chapter 7: Unsupervised Learning", " Dimensionality Reduction", " Principal Component Analysis", " Multidimensional Scaling", " Clustering", " k-means Clustering", " Hierarchical Clustering", " Association Rules", " Exercises", " Dealing with Missing Data in the HouseVotes84 Data", " k-means", "Chapter 8: Project 1: Hitting the Bottle", " Importing Data", " Exploring the Data", " Distribution of Quality Scores", " Is This Wine Red or White?", " Fitting Models", " Exercises", " Exploring Other Formulas", " Exploring Different Models", " Analyzing Your Own Data Set", "Chapter 9: Deeper into R Programming", " Expressions", " Arithmetic Expressions", " Boolean Expressions", " Basic Data Types", " Numeric", " Integer", " Complex", " Logical", " Character", " Data Structures", " Vectors", " Matrix", " Lists", " Indexing", " Named Values", " Factors", " Formulas", " Control Structures", " Selection Statements", " Loops", " Functions", " Named Arguments", " Default Parameters", " Return Values", " Lazy Evaluation", " Scoping", " Function Names Are Different from Variable Names", " Recursive Functions", " Exercises", " Fibonacci Numbers", " Outer Product", " Linear Time Merge", " Binary Search", " More Sorting", " Selecting the k Smallest Element", "Chapter 10: Working with Vectors and Lists", " Working with Vectors and Vectorizing Functions", " ifelse", " Vectorizing Functions", " The apply Family", " apply", " Nothing Good, It Would Seem", " lapply", " sapply and vapply", " Advanced Functions", " Special Names", " Infix Operators", " Replacement Functions", " How Mutable Is Data Anyway?", " Exercises", " between", " rmq", "Chapter 11: Functional Programming", " Anonymous Functions", " Higher-Order Functions", " Functions Taking Functions As Arguments", " Functions Returning Functions (and Closures)", " Filter, Map, and Reduce", " Functional Programming with purrr", " Functions As Both Input and Output", " Ellipsis Parameters...", " Exercises", " apply_if", " power", " Row and Column Sums", " Factorial Again", " Function Composition", " Implement This Operator", "Chapter 12: Object-Oriented Programming", " Immutable Objects and Polymorphic Functions", " Data Structures", " Example: Bayesian Linear Model Fitting", " Classes", " Polymorphic Functions", " Defining Your Own Polymorphic Functions", " Class Hierarchies", " Specialization As Interface", " Specialization in Implementations", " Exercises", " Shapes", " Polynomials", "Chapter 13: Building an R Package", " Creating an R Package", " Package Names", " The Structure of an R Package", " .Rbuildignore", " Description", " Title", " Version", " Description", " Author and Maintainer", " License", " Type, Date, LazyData", " URL and BugReports", " Dependencies", " Using an Imported Package", " Using a Suggested Package", " NAMESPACE", " R/ and man/", " Checking the Package", " Roxygen", " Documenting Functions", " Import and Export", " Package Scope vs. Global Scope", " Internal Functions", " File Load Order", " Adding Data to Your Package", " NULL", " Building an R Package", " Exercises", "Chapter 14: Testing and Package Checking", " Unit Testing", " Automating Testing", " Using testthat", " Writing Good Tests", " Using Random Numbers in Tests", " Testing Random Results", " Checking a Package for Consistency", " Exercise", "Chapter 15: Version Control", " Version Control and Repositories", " Using Git in RStudio", " Installing Git", " Making Changes to Files, Staging Files, and Committing Changes", " Adding Git to an Existing Project", " Bare Repositories and Cloning Repositories", " Pushing Local Changes and Fetching and Pulling Remote Changes", " Handling Conflicts", " Working with Branches", " Typical Workflows Involve Lots of Branches", " Pushing Branches to the Global Repository", " GitHub", " Moving an Existing Repository to GitHub", " Installing Packages from GitHub", " Collaborating on GitHub", " Pull Requests", " Forking Repositories Instead of Cloning", " Exercises", "Chapter 16: Profiling and Optimizing", " Profiling", " A Graph-Flow Algorithm", " Speeding Up Your Code", " Parallel Execution", " Switching to C++", " Exercises", "Chapter 17: Project 2: Bayesian Linear Regression", " Bayesian Linear Regression", " Exercises: Priors and Posteriors", " Predicting Target Variables for New Predictor Values", " Formulas and Their Model Matrix", " Working with Model Matrices in R", " Exercises", " Model Matrices Without Response Variables", " Exercises", " Interface to a blm Class", " Constructor", " Updating Distributions: An Example Interface", " Designing Your blm Class", " Model Methods", " Building an R Package for blm", " Deciding on the Package Interface", " Organization of Source Files", " Document Your Package Interface Well", " Adding README and NEWS Files to Your Package", " Testing", " GitHub", "Conclusions", " Data Science", " Machine Learning", " Data Analysis", " R Programming", " The End", "Index".

Her er lidt om versionskontrol og R markdown. Og en masse nyttigt om R pakker.
… (lisätietoja)
 
Merkitty asiattomaksi
bnielsen | Oct 4, 2023 |
Indeholder "Contents at a Glance", "About the Author", "About the Technical Reviewer", "Introduction", "Chapter 1: Anatomy of a Function", " Manipulating Functions", " Formals", " Function Bodies", " Function Environments", " Calling a Function", " Modifying Functions", " Constructing Functions", "Chapter 2: Inside a Function Call", " Getting the Components of the Current Function", " Accessing Actual Function Parameters", " Accessing the Calling Scope", "Chapter 3: Expressions and Environments", " Expressions", " Chains of Linked Environments", " Environments and Function Calls", " Manipulating Environments", " Explicitly Creating Environments", " Environments and Expression Evaluation", "Chapter 4: Manipulating Expressions", " The Basics of Expressions", " Accessing and Manipulating Control Structures", " Accessing and Manipulating Function Calls", " Expression Simplification", " Automatic Differentiation", "Chapter 5: Working with Substitutions", " A Little More on Quotes", " Parsing and Deparsing", " Substitution", " Substituting Expressions Held in Variables", " Substituting Function Arguments", " Nonstandard Evaluation", " Nonstandard Evaluation from Inside Functions", " Writing Macros with NSE", " Modifying Environments in Evaluations", "Accessing Promises Using the pryr Package", "Afterword", "Index".

R er bygget ovenpå S, der ligner Lisp, når man kigger inden i. Dvs der er redskaber til en slags introspektiv undersøgelse af hvilket miljø, de forskellige funktioner svømmer rundt i. Man kan også ændre i omgivelserne og påføre funktioner egenskaber som forsinket evaluering, så man kan bestemme helt over scope for funktioner. Det er supersmart til at lave ting som ggplot2.

Underholdning for nørder. Et sted står der noget om formal language specification, men ingen reference. Jeg spekulerer på hvordan man skal tænke på en pakke som pryr. Hedder den virkelig bare pryr, ah det skal læses som Pry R, dvs undersøg r, ja, det er jo indlysende? og hvordan er den pakke lavet, hvis man ikke kan lave den i primitiv R?
https://colinfay.me/r-language-definition/index.html har "The R language definition" for version 3.4.2 (2017-09-28).
… (lisätietoja)
 
Merkitty asiattomaksi
bnielsen | Sep 8, 2022 |
Indeholder "About the Author vii", "About the Technical Reviewer", "Chapter 1: Introduction", "Chapter 2: Importing Data: readr", " Functions for Reading Data", " File Headers", " Column Types", " String-based Column Type Specification", " Function-based Column Type Specification", " Parsing Time and Dates", " Space-separated Columns", " Functions for Writing Data", "Chapter 3: Representing Tables: tibble", " Creating Tibbles", " Indexing Tibbles", "Chapter 4: Reformatting Tables: tidyr", " Tidy Data", " Gather and Spread", " Complex Column Encodings", " Expanding, Crossing, and Completing", " Missing Values", " Nesting Data", "Chapter 5: Pipelines: magrittr", " The Problem with Pipelines", " Pipeline Notation", " Pipelines and Function Arguments", " Function Composition", " Other Pipe Operations", "Chapter 6: Functional Programming: purrr", " General Features of purrr Functions", " Filtering", " Mapping", " Reduce and Accumulate", " Partial Evaluation and Function Composition", " Lambda Expressions", "Chapter 7: Manipulating Data Frames: dplyr", " Selecting Columns", " Filter", " Sorting", " Modifying Data Frames", " Grouping and Summarizing", " Joining Tables", " Income in Fictional Countries", "Chapter 8: Working with Strings: stringr", " Counting String Patterns", " Splitting Strings", " Capitalizing Strings", " Wrapping, Padding, and Trimming", " Detecting Substrings", " Extracting Substrings", " Transforming Strings", "Chapter 9: Working with Factors: forcats", " Creating Factors", " Concatenation", " Projection", " Adding Levels", " Reorder Levels", "Chapter 10: Working with Dates: lubridate", " Time Points", " Time Zones", " Time Intervals", "Chapter 11: Working with Models: broom and modelr", " broom", " modelr", "Chapter 12: Plotting: ggplot2", " The Basic Plotting Components in ggplot2", " Adding Components to Plot Objects", " Adding Data", " Adding Aesthetics", " Adding Geometries", " Facets", " Adding Coordinates", "Chapter 13: Conclusions", "Index".

En række kapitler med gode eksempler på brug af tidyverse og mange af pakkerne fra det univers. Der er masser af muligheder for at træde rustne søm op i foden alligevel, men det hjælper jo at have eksempler på noget, der virker. Fx er det opskriften på uendelig kval at forsøge at læse /dev/stdin med brug af readr, men det kan man jo ikke vide. Her er readr.read_tsv() meget fornuftigt kun beskrevet med input fra en helt almindelig fil og det virker.

Her er min opskrift på at læse LTs exportfil ind som en tibble af strenge uden at røre ved trailing space i Page_Count og uden at få ekstra "" tegn ind. Når man skriver den ud, skal man tilsvarende slå behandling af NA og escape tegn fra. Min lt.rdb indeholder en ekstra række som linie 2, men den kan slås ihjel med et filter. Eneste forskel på lt.rdb og lt.tidy er derfor den ekstra linie med kolonneoplysninger til brug for rdb-programmerne.

data=filter(read_tsv(file="/tmp/lt.rdb", quote="", trim_ws=FALSE, col_types = cols(.default = "c")),!row_number() %in% c(1))
write_tsv(data, file="/tmp/lt.tidy", escape="none", na="")

Jeg har undladt at bruge en pipe mellem read_tsv og filter fordi større-end-tegn er rarest at undgå i reviews i LT.

Jeg troede at tribble var en stavefejl, men det er vist bare en intern joke af forfatteren til tibble modulet. Jeg fandt ud af at lave et program, der bruger ggplot2 til at plotte løsninger til tilfældige andengradsligninger af type x^2 + ax + b = 0, hvor a og b er valgt tilfældigt mellem -1 og 1.
… (lisätietoja)
 
Merkitty asiattomaksi
bnielsen | Sep 8, 2022 |

Tilastot

Teokset
17
Jäseniä
45
Suosituimmuussija
#340,917
Arvio (tähdet)
3.8
Kirja-arvosteluja
6
ISBN:t
30