No articles match
Cheat sheets8 days ago
Inserting fixed-effects in a fixest estimation | Performing 2SLS/IV estimations in feols. | Estimation with multiple left-hand-sides or multiple right-hand-sides | Variable interpolation in fixest formulas | How to use fixest built-in VCOVs
On Standard Errors9 days ago
Review of theory | FWL for variance-covariance matrix | Generalized linear models | How standard-errors are computed in fixest | The argument vcov | Classical standard errors | Heteroskedasticity-robust standard errors | Cluster-robust standard errors | Heteroskedasticity and auto-corrleation robust standard errors | Spatial-correlation robust standard errors | Other options | Small sample correction | Yet more details | Replicating standard-errors from other methods | The data set and heteroskedasticity-robust SEs | "IID" SEs in the presence of fixed-effects | Clustered SEs | HAC SEs | Other multiple fixed-effects methods | Defining how to compute the standard-errors once and for all | Changelog | References & acknowledgments
Introduction to data.table16 days ago
Data analysis using data.table | Data | Introduction | 1. Basics | a) What is data.table? | Note that: | b) General form - in what way is a data.table enhanced? | The way to read it (out loud) is: | c) Subset rows in i | -- Get all the flights with "JFK" as the origin airport in the month of June. | -- Get the first two rows from flights. | -- Sort flights first by column origin in ascending order, and then by dest in descending order: | order() is internally optimised | d) Select column(s) in j | -- Select arr_delay column, but return it as a vector. | -- Select arr_delay column, but return as a data.table instead. | Tip: | -- Select both arr_delay and dep_delay columns. | -- Select both arr_delay and dep_delay columns and rename them to delay_arr and delay_dep. | e) Compute or do in j | -- How many trips have had total delay < 0? | What's happening here? | f) Subset in i and do in j | -- Calculate the average arrival and departure delay for all flights with "JFK" as the origin airport in the month of June. | -- How many trips have been made in 2014 from "JFK" airport in the month of June? | g) Handle non-existing elements in i | -- What happens when querying for non-existing elements? | Special symbol .N: | h) Great! But how can I refer to columns by names in j (like in a data.frame)? | -- Select both arr_delay and dep_delay columns the data.frame way. | -- Select columns named in a variable using the .. prefix | -- Select columns named in a variable using with = FALSE | 2. Aggregations | a) Grouping using by | -- How can we get the number of trips corresponding to each origin airport? | -- How can we calculate the number of trips for each origin airport for carrier code "AA"? | -- How can we get the total number of trips for each origin, dest pair for carrier code "AA"? | -- How can we get the average arrival and departure delay for each orig,dest pair for each month for carrier code "AA"? | b) Sorted by: keyby | -- So how can we directly order by all the grouping variables? | c) Chaining | -- How can we order ans using the columns origin in ascending order, and dest in descending order? | d) Expressions in by | -- Can by accept expressions as well or does it just take columns? | e) Multiple columns in j - .SD | -- Do we have to compute mean() for each column individually? | Special symbol .SD: | -- How can we specify just the columns we would like to compute the mean() on? | .SDcols | f) Subset .SD for each group: | -- How can we return the first two rows for each month? | g) Why keep j so flexible? | -- How can we concatenate columns a and b for each group in ID? | -- What if we would like to have all the values of column a and b concatenated, but returned as a list column? | Summary | Using i: | Using j: | Using by: | And remember the tip:
Cartesian Products and Partitions of Groups16 days ago
expandGrid | Matrix vs Data.Frame Output | Always Return data.frame | Familiar RcppAlgos API Components | expandGridSample | Powerful Iterators with expandGridIter | Cartesian Product where Order does not Matter | In the Wild | Partitions of Groups with comboGroups | Partitions of Groups of Varying Sizes | Relevant Posts on Stackoverflow as well as OEIS.
Attacking Problems Related to the Subset Sum Problem17 days ago
Building on Integer Partitions | Working with Negative Numbers | Partitions with no Restrictions | Taming Floating Point Numbers | prod and mean | Using Iterators
Combination and Permutation Basics17 days ago
Introducing comboGeneral and permuteGeneral | Combinations/Permutations with Repetition | Working with Multisets | Enter freqs | Parallel Computing | Using arguments lower and upper | Generating Results Beyond .Machine$integer.max | GMP Support | User Defined Functions | Using FUN.VALUE | Passing additional arguments with ... | S3 methods
Combinatorial Iterators in RcppAlgos17 days ago
Iterating over Combinations and Permutations | Bidirectional Iterators | Retrieving More than One Result at a Time | Random Access Iterator | User Defined Functions | Transition from Rcpp Modules to S4 + External Pointers | Access Efficiency in 2.5.0+ | Version 2.4.3 Using Rcpp | Version 2.10.1 (No Rcpp) | Caching Results w/ 2.4.3 | Caching Results w/ 2.10.1 | Access Efficiency Conclusions | Iterating over Partitions and Compositions of a Number | Iterating over Constrained Combinations/Permutations | Iterating over Partitions of Groups
Combinatorial Sampling and Ranking17 days ago
Sampling | Base R | RcppAlgos Solutions | comboSample and permuteSample | Samples of Results with Repetition | Specific Results with sampleVec | Using namedSample | Parallel Computing and GMP Support | Efficiency | User Defined Functions | partitionsSample | compositionsSample | compositionSample with Specific target | compositionSample with Distinct Parts | Unranking Distinct Parts | Sampling Partitions of Groups with comboGroupsSample | Ranking | Rank Multiple Inputs | comboRank | permuteRank | partitionsRank | compositionsRank
Computational Mathematics Overview17 days ago
primeSieve | Larger primes | primeCount | Other Sieving Functions | Vectorized Functions
Constraints in RcppAlgos: Constraint-Driven Combinatorial Enumeration17 days ago
Related articles | Constraint Functions | Faster than rowSums and rowMeans | Comparison Operators and limitConstraints | One Comparison Operator | Two Comparison Operators | Using tolerance | Output Order with permuteGeneral | Integer Partitions & Compositions | Safely Interrupt Execution with cpp11::check_user_interrupt | Note about Interrupting Execution
High Performance Benchmarks17 days ago
Setup Information | Combinations | Combinations - Distinct | Combinations - Repetition | Combinations - Multisets | Permutations | Permutations - Distinct | Permutations - Repetition | Permutations - Multisets | Partitions | Partitions - Distinct | All Distinct Partitions | Restricted Distinct Partitions | Partitions - Repetition | All Partitions | Restricted Partitions | Partitions - Multisets | Compositions | Compositions - Repetition | All Compositions (Small case) | All Compositions (Larger case) | Compositions of Specific Length | Specialized Composition Benchmarks | Compositions with Specific target | Compositions with Distinct Parts | Compositions with Distinct Parts & Specific target | Iterators
Integer Compositions in RcppAlgos17 days ago
Integer Compositions | Standard Compositions | Case 1: All Compositions of N | Case 2: Compositions of N of Length m | Distinct Compositions | Case 3: Compositions of N into Distinct Parts | Verifying Distinct Compositions via Partitions (Brute Force Construction) | Case 4: Integer Compositions of N into Parts of Varying Multiplicity | Generating Compositions with permuteGeneral() | The Role of target | Efficiency Generating Partitions and Compositions
Integer Partitions in RcppAlgos17 days ago
Integer Partitions | Standard Partitions | Case 1: All Integer Partitions of N | Case 2: Integer Partitions of N of Length m | Distinct Partitions | Case 3: Integer Partitions of N into Distinct Parts | Using freqs to Refine Length | Euler’s Theorem in Action (Odd Parts and Distinct Parts) | Caveats Using freqs | Partitions of Multisets | Case 4: Integer Partitions of N into Parts of Varying Multiplicity | Using the table S3 Method | The Role of target | Efficiency Generating Partitions
Reference semantics23 days ago
Data | Introduction | 1. Reference semantics | a) Background | shallow vs deep copy | b) The := operator | 2. Add/update/delete columns by reference | a) Add columns by reference | -- How can we add columns speed and total delay of each flight to flights data.table? | Note that | b) Update some rows of columns by reference - sub-assign by reference | -- Replace those rows where hour == 24 with the value 0 | Exercise: | c) Delete column by reference | -- Remove delay column | d) := along with grouping using by | -- How can we add a new column which contains for each orig,dest pair the maximum speed? | Note on zero-length RHS and by | e) Multiple columns and := | -- How can we add two more columns computing max() of dep_delay and arr_delay for each month, using .SD? | -- How can we update multiple existing columns in place using .SD? | 3. := and copy() | a) := for its side effect | b) The copy() function | c) Selecting columns: $ / [[...]] vs [, col] | Summary | The := operator
Exporting estimation tables27 days ago
Preliminaries | Displaying tables in the console | Styling console output with style.df | Postprocessing with postprocess.df | Setting default values | Exporting tables to LaTeX | Styling LaTeX output with style.tex | Postprocessing with postprocess.tex | Setting default values: LaTeX edition | Highlighting coefficients | Frame | Row colors | Style | LaTeX extras | threeparttable | adjustbox | makecell | Exporting tables to other formats | Exporting tables as PNGs | Quarto and Rmarkdown: argument markdown | CSS for custom HTML output | Monitoring the look of the tables: the argument page.width | RStudio and Positron (VS Code): argument view | Custom fit statistics | Other tabling software
Fast Fixed-Effects Estimation: Short Introduction28 days ago
Simple example using trade data | Estimation | Clustering the standard-errors | Other standard-errors | Other estimation functions | Viewing the results in R | Multiple estimations | Exporting the results to Latex | An elaborate example | Extracting the fixed-effects coefficients | The vcov argument | Basics: main calls and shortcuts | Using dedicated functions | Small sample correction | Other types of VCOVs | Instrumental variables | Interaction terms | Interactions involving fixed-effects | Combining several fixed-effects (fe1^fe2^fe3...) | Varying slopes (fe[x]) | Interactions that don't involve fixed-effects | A compact syntax for factors and interactions: i() | Simple difference-in-differences (TWFE) | Staggered difference-in-differences (Sun and Abraham, 2020) | Additional features | Formula: macros and dot square brackets | Formula macros | The dot square bracket operator | Lagging variables | Lagging variables in an estimation | Setting up a panel data set | Creating lag/lead variables | Non-linear in parameters example | Adding fixed-effects to non-linear in parameters models | Multi-threading
Multiple estimations28 days ago
First illustration | Performing multiple estimations | Multiple LHS | Multiple RHS and fixed-effects: stepwise functions | Split sample estimations | Combining multiple estimations | Manipulation of multiple estimations | Basic access | Putting order | Some notes | Note on standard-errors | Note on IVs | Note on memory usage
Importing data.table29 days ago
Why to import data.table | Importing data.table is easy | DESCRIPTION file | NAMESPACE file | Usage | Testing | Testing using testthat | Dealing with "undefined global functions or variables" | Care needed when providing and using options | Troubleshooting | License | Optionally import data.table: Suggests | data.table in Imports but nothing imported | Further information on dependencies | Importing data.table C routines | How to convert your Depends dependency on data.table to Imports | Step 0. Ensure your package is passing R CMD check initially | Step 1. Update the DESCRIPTION file to put data.table in Imports, not Depends | Step 2.1: Run R CMD check | Step 2.2: Modify the NAMESPACE file | Blanket import | Step 3: Update Your R code files outside the package's R/ directory | Benefits of using Imports
collapse Documentation and Resources1 months ago
Built-In Structured Documentation | DeepWiki | JSS Article | Cheatsheet | Vignettes | Blog | Presentations and Slides
mirai - Reference Manual1 months ago
1. Introduction | mirai | mirai (advanced) | daemons | 2. Error Handling | 3. Local Daemons | With Dispatcher (default) | Without Dispatcher | everywhere() | 4. Memory Management | Queue Backpressure | Non-blocking Submission | Shared Memory with Local Daemons | 5. mirai_map | Basic Usage | Collecting Options | Multiple Map | Nested Maps | 6. Remote Infrastructure | Remote Daemons Overview | Launching Remote Daemons | SSH Direct Connection | SSH Tunnelling | HPC Cluster Resource Managers | Job Arrays | HTTP Launcher | Default: Posit Workbench | Custom HTTP APIs | Troubleshooting | Generic Remote Configuration | Manual Deployment | TLS Secure Connections | Automatic Zero-configuration Default | CA Signed Certificates | 7. Compute Profiles | with_daemons() and local_daemons() | With Method | 8. Advanced Topics | Random Number Generation | Synchronous Mode
mirai - Community FAQs2 months ago
1. Migration from future_promise() | 2. Setting the random seed | 3. Accessing package functions during development | 4. Why does mirai() take time when it's meant to return immediately? | 5. Creating daemons on-demand or shutting down idle daemons | 6. Launching daemons --vanilla
cpp11 internals2 months ago
Initial setup and dev workflow | Code formatting | Code organization | Naming conventions | Vector classes | Coercion functions | Protection | Protect list | Unwind Protect
FAQ2 months ago
1. What are the underlying types of cpp11 objects? | 2. How do I add elements to a list? | 3. Does cpp11 support default arguments? | 4. How do I create a new empty list? | 5. How do I retrieve (named) elements from a named vector/list? | 6. How can I tell whether a vector is named? | 7. How do I return a cpp11::writable::logicals object with only a FALSE value? | 8. How do I create a new empty environment? | 9. How do I assign and retrieve values in an environment? What happens if I try to get a value that doesn't exist? | 10. How can I create a cpp11:raws from a std::string? | 11. How can I create a std::string from a cpp11::writable::string? | 12. What are the types for C++ iterators? | 13. My code has using namespace std, why do I still have to include std:: in the signatures of [[cpp11::register]] functions? | 14. How do I modify a vector in place? | 15. Should I call cpp11::unwind_protect() manually? | Destructors | Nested unwind_protect() | 16. Ok but I really want to call cpp11::unwind_protect() manually
Get started with cpp112 months ago
Introduction | Outline | Prerequisites | Getting started with C++ | No inputs, scalar output | Scalar input, scalar output | Vector input, scalar output | Vector input, vector output | Using cpp_source | Exercises | Other classes | Lists and data frames | Functions | Attributes | Missing values | Scalars | Integers | Doubles | Strings | Boolean | Vectors | Standard Template Library | Using iterators | Algorithms | Data structures | Vectors | Sets | Case studies | Gibbs sampler | R vectorisation versus C++ vectorisation | Using cpp11 in a package | Learning more
Motivations for cpp112 months ago
Motivations | Copy-on-write semantics | Improve safety | C safety | C++ safety | Altrep support | Altrep benchmarks | UTF-8 everywhere | C++11 features | Simpler implementation | Compilation speed | Header only | Vendoring | Protection | Growing vectors | Conclusion
mirai - Quick Reference2 months ago
Core Concepts | Key Takeaways | 1. Basic mirai Usage | Create and Access Results | Passing Data | 2. Local Daemons | Basic Setup | Daemon Configuration | Synchronous Mode (Testing/Debugging) | 3. Remote Daemons - SSH Direct | Setup Host to Accept Remote Connections | URL Constructors | SSH Configuration | 4. Remote Daemons - SSH Tunnelling | When to Use Tunnelling | Setup | 5. HPC Cluster Configurations | General Pattern | Scheduler-Specific Directives | 6. HTTP Launcher | 7. Manual Daemon Deployment | Generate Launch Commands | 8. Compute Profiles | Multiple Independent Profiles | Scoped Profiles | 9. Common Patterns | Temporary Daemons | Mixed Local/Remote Resources | Dynamic Scaling | 10. mirai_map - Parallel Map | Basic Usage | Collection Options | Multiple Map (over DataFrame/Matrix) | 11. Error Handling | 12. Monitoring | 13. Advanced Features | Timeouts | Cancellation | Evaluation Everywhere | Random Seeds (Reproducible) | Custom Serialization | TLS Configuration | 14. Dispatcher vs. Direct | 15. Quick Decision Tree | 16. Common Gotchas
dggridR: Discrete Global Grids for R2 months ago
Kevin Sahr's DGGRID Manual2 months ago
stringfish2 months ago
Installation | Benchmark | Currently implemented functions | Extensibility
mirai - For Package Authors3 months ago
Agent Skill | 1. Developer Interfaces | 2. Guidance
geodist3 months ago
Detailed Usage | Benchmarks of geodesic accuracy | Performance comparison
igraph (interfaz R)3 months ago
Instalación | Uso de igraph | Crear un grafo | IDs de vértices y aristas | Añadir y borrar vértices y aristas | Construcción de grafos | Establecer y recuperar atributos | Propiedades estructurales de los grafos | Búsqueda de vértices y aristas basada en atributos | Selección de vértices | Selección de aristas | Tratar un grafo como una matriz de adyacencia | Diseños y graficación | Algoritmos de diseño | Dibujar un grafo utilizando un diseño | Atributos de los vértices para graficar | Atributos de las aristas para graficar | Argumentos más comunes de plot() | igraph y el mundo exterior | Dónde ir a continuación | Información de la sesión
igraph (R interface)3 months ago
Installation | Usage | Creating a graph | Vertex and edge IDs | Adding/deleting vertices and edges | Constructing graphs | Setting and retrieving attributes | Structural properties of graphs | Querying vertices and edges based on attributes | Selecting vertices | Selecting edges | Treating a graph as an adjacency matrix | Layouts and plotting | Layout algorithms | Drawing a graph using a layout | Vertex attributes controlling graph plots | Edge attributes controlling graph plots | Generic arguments of plot() | igraph and the outside world | Where to go next | Session info
Introduction to anytime3 months ago
Motivation
stars proxy objects 3 months ago
Preamble: the starsdata package | Reading chunks, change resolution, select bands | Reading a particular chunk | Reading at a different resolution | Stars proxy objects | Methods for stars proxy objects | Select attributes | Select an area | Lazy evaluation, changing evaluation order | Fetching the data | Plotting with changed evaluation order | Multi-resolution proxy objects
stars tidyverse methods 3 months ago
slice | filter | pull | mutate | select | geom_stars
vector-raster conversions, reprojection, warping 3 months ago
Rasterizing an sf vector object | Vectorizing a raster object to an sf object | Polygonizing | Exporting to points | Exporting to polygons | Switching between vector and raster in stars objects | Reprojecting a raster | Warping a raster
How raster functions map to stars functions 3 months ago
COMMENT LEGEND | Creating objects | Changing spatial extent and/or resolution of objects | Cell based computation | Spatial contextual computation | Model predictions | Data type conversion | Summarizing | Accessing values of objects | Plotting | Getting and setting dimensions | Computing row, column, cell numbers and coordinates
Statistical modelling with stars objects 3 months ago
Training and prediction with stars objects | stars objects as data.frames | Predict for stars objects | models fitted for every pixel | Linear regression on pixel time series | Unsupervised learners | Principal components | K-means clustering | Supervised learners | Random Forest land use classification | Parallel processing
An Introduction to Polars from R3 months ago
What is Polars? | Documentation and tutorials | Series and DataFrames | Methods and pipelines | Subset | Aggregate and modify | Reshape | Join | Lazy execution | Data import | Execute R functions within a Polars query | Data types
Using custom functions or other R packages3 months ago
Writing functions using polars expressions | Using purrr | Conclusion
Using Rust code in R packages4 months ago
Initialize a package | Package structure | Compile a package | Generated R code | Load a package
nanotime: A datetime library with nanosecond precision4 months ago
Implementation of the temporal types
Installation details4 months ago
How to install | From R-multiverse (recommended) | From GitHub | Details of installation | Pre-built Rust library binaries | Rust build time options | Features | Profile | Minimum Supported Rust Version (MSRV) | Builds for WASM/Emscripten
Reading, Writing and Converting Simple Features 4 months ago
Reading and writing through GDAL | Using st_read | Using st_write | Guessing a driver for output | Dataset and layer reading or creation options | Reading and writing directly to and from spatial databases | Conversion to other formats: WKT, WKB, sp | Conversion to and from well-known text | Conversion to and from well-known binary | Conversion to and from sp
Manipulating Simple Feature Geometries 4 months ago
Type transformations | For single geometries | For collections of geometry (sfc) and simple feature collections (sf) | Affine transformations | Coordinate reference systems conversion and transformation | Getting and setting coordinate reference systems of sf objects | Coordinate reference system transformations | Geometrical operations | Unary operations | Binary operations: distance and relate | Binary logical operations: | Operations returning a geometry
Manipulating Simple Features 4 months ago
Subsetting feature sets | Aggregating or summarizing feature sets | Joining two feature sets based on attributes | Joining two feature sets based on geometries
Plotting Simple Features 4 months ago
Plot methods for sf and sfc objects | Geometry only: sfc | Geometry with attributes: sf | Color key place and size | Class intervals | How does sf project geographic coordinates? | Graticules | Plotting sf objects with other packages | grid: st_as_grob | ggplot2 | mapview | tmap
mirai - Promises (Shiny and Plumber)4 months ago
1. Event-driven promises | 2. Shiny ExtendedTask: Introduction | 3. Shiny ExtendedTask: Cancellation | 4. Shiny ExtendedTask: Generative Art | 5. Shiny ExtendedTask: mirai map | 6. Shiny Async: Coin Flips | 7. Shiny Async: Progress Bar | 8. Plumber GET Endpoint | 9. Plumber POST Endpoint
Information for package authors4 months ago
Guidance for Package Authors | Naming rationalization ast2ast | Comparison of R and ETR code | The XPtr interface | First, one creates the external pointer of the R function. | Afterwards the external pointer is used in an R package | call the function from the R package
Simple Features for R 4 months ago
What is a feature? | Dimensions | Simple feature geometry types | Coordinate reference system | How simple features in R are organized | sf: objects with simple features | sfc: simple feature geometry list-column | Mixed geometry types | sfg: simple feature geometry | Well-known text, well-known binary, precision | WKT and WKB | Precision | Reading and writing | Driver-specific options | Create, read, update and delete | Connection to spatial databases | Coordinate reference systems and transformations | Conversion, including to and from sp | Geometrical operations | Non-simple and non-valid geometries | Units | How attributes relate to geometries
Translation4 months ago
Introduction | The basics | Simple verbs | filter() and arrange() | select(), summarise(), transmute() | Other calls | rename() | distinct() | Joins | Set operations | Grouping | Combinations | Copies | Performance
Fast Read and Fast Write5 months ago
1. fread() | 1.1 Using command line tools directly | 1.1.1 Reading directly from a text string | 1.1.2 Reading from URLs | 1.1.3 Automatic decompression of compressed files | 1.2 Automatic separator and skip detection | 1.3 High-Quality Automatic Column Type Detection | 1.4 Early Error Detection at End-of-File | 1.5 integer64 Support | 1.6 Drop or Select Columns by Name or Position | 1.7 Automatic Quote Escape Detection (Including No-Escape) | 2. fwrite() | 2.1 Intelligent and Minimalist Quoting (quote="auto") | 2.2 Fine-Grained Date/Time Serialization (dateTimeAs argument) | 2.3 Handling of bit64::integer64 | 2.4 Column Order and Subset Control | 3. A Note on Performance
Introduction to kit5 months ago
Overview | Parallel Statistical Functions | Row-wise Arithmetic | Row-wise Min, Max, and Range | Coalescing Values | Logical and Count Operations | Vectorized Conditionals | Fast If-Else (iif) | Nested Conditionals (nif) | Vectorized Switch (vswitch, nswitch) | Fast Unique and Duplicates | Unique Values and Duplicates | Counting Occurrences | Sorting and Utilities | Partial Sorting (topn) | Factor Manipulation | Finding Positions (fpos) | Summary
Joins in data.table5 months ago
1. Defining example data | 2. data.table joining syntax | 3. Equi joins | 3.1. Right join | 3.1.1. Joining by a list argument | 3.1.2. Alternatives to define the on argument | 3.1.3. Operations after joining | Managing shared column Names with the j argument | Summarizing with on in data.table | 3.1.4. Joining based on several columns | 3.2. Inner join | 3.3. Anti-join | 3.4. Semi join | 3.5. Left join | 3.5.1. Joining after chain operations | 3.6. Many to many join | 3.6.1. Selecting one match | 3.6.2. Cross join | 3.7. Full join | 4. Non-equi join | 4.1 Output column names in non-equi joins | 5. Rolling join | 6. Taking advantage of joining speed | 6.1. Subsets as joins | 6.2. Updating by reference | Reference
Get started with vroom5 months ago
Reading files | Reading multiple files | Reading compressed files | Reading individual files from a multi-file zip archive | Reading remote files | Column selection | Reading fixed width files | Column types | Name repair | Writing delimited files | Writing CSV delimited files | Writing compressed files | Reading and writing from standard input and output | Further reading
S3 vectors5 months ago
Basics | Percent class | format() method | Casting and coercion | Double dispatch | Percent class | Decimal class | Cached sum class | Record-style objects | Rational class | Decimal2 class | Equality and comparison | Polynomial class | Make an atomic polynomial vector | Implementing equality and comparison | Arithmetic | Cached sum class | Meter class | Implementing a vctrs S3 class in a package | Getting started | Low-level and user-friendly constructors | Other helpers | Testing | Existing classes
Spherical geometry in sf using s2geometry 5 months ago
Introduction | Projected and geographic coordinates | Fundamental differences | Polygons on $S^2$ divide the sphere in two parts | Semi-open polygon boundaries | Bounding cap, bounding rectangle | Switching between S2 and GEOS | Measures | Area | Length | Distances | Predicates | Transformations | Buffers | st_buffer or st_is_within_distance? | References
Detailed Documentation6 months ago
Overview | Type system in ast2ast | Setting types for function arguments | Default behavior | Using args_f | Borrowing, constness, and references | Setting types for variables inside the function | Immutability of types | Derivatives | Forward mode | Reverse mode | Design philosophy | Interpolation
Vroom Benchmarks6 months ago
How it works | Reading delimited files | Taxi Trip Dataset | Taxi Benchmarks | All numeric data | Long | Wide | All character data | Reading multiple delimited files | Reading fixed width files | United States Census 5-Percent Public Use Microdata Sample files | Census data benchmarks | Writing delimited files | Session and package information
Keys and fast binary search based subset6 months ago
Data | Introduction | 1. Keys | a) What is a key? | Keys and their properties | b) Set, get and use keys on a data.table | -- How can we set the column origin as key in the data.table flights? | set* and :=: | -- Use the key column origin to subset all rows where the origin airport matches "JFK" | -- How can we get the column(s) a data.table is keyed by? | c) Keys and multiple columns | -- How can I set keys on both origin and dest columns? | -- Subset all rows using key columns where first key column origin matches "JFK" and second key column dest matches "MIA" | How does the subset work here? | -- Subset all rows where just the first key column origin matches "JFK" | -- Subset all rows where just the second key column dest matches "MIA" | What's happening here? | 2. Combining keys with j and by | a) Select in j | -- Return arr_delay column as a data.table corresponding to origin = "LGA" and dest = "TPA". | b) Chaining | -- On the result obtained above, use chaining to order the column in decreasing order. | c) Compute or do in j | -- Find the maximum arrival delay corresponding to origin = "LGA" and dest = "TPA". | d) sub-assign by reference using := in j | e) Aggregation using by | -- Get the maximum departure delay for each month corresponding to origin = "JFK". Order the result by month | 3. Additional arguments - mult and nomatch | a) The mult argument | -- Subset only the first matching row from all rows where origin matches "JFK" and dest matches "MIA" | -- Subset only the last matching row of all the rows where origin matches "LGA", "JFK", "EWR" and dest matches "XNA" | b) The nomatch argument | -- From the previous example, Subset all rows only if there's a match | 4. binary search vs vector scans | a) Performance of binary search approach | b) Why does keying a data.table result in blazing fast subsets? | Vector scan approach | Binary search approach | Summary
Programming on data.table6 months ago
Introduction | Problem description | Example | Approaches to the problem | Avoid lazy evaluation | Use of parse / eval | Computing on the language | Use third party packages | Substituting variables and names | Substitute functions | Substitute variables and character values | Substituting lists of arbitrary length | Substitution of a complex query | Common mistakes | Use env argument from inside another function | Retired interfaces | get | mget | eval
Secondary indices and auto indexing6 months ago
Data | Introduction | 1. Secondary indices | a) What are secondary indices? | Keyed vs. Indexed Subsetting | b) Set and get secondary indices | -- How can we set the column origin as a secondary index in the data.table flights? | -- How can we get all the secondary indices set so far in flights? | c) Why do we need secondary indices? | -- Reordering a data.table can be expensive and not always ideal | setkey() requires: | -- There can be only one key at the most | -- Secondary indices can be reused | -- The new on argument allows for cleaner syntax and automatic creation and reuse of secondary indices | on argument | 2. Fast subsetting using on argument and secondary indices | a) Fast subsets in i | -- Subset all rows where the origin airport matches "JFK" using on | -- How can I subset based on origin and dest columns? | b) Select in j | -- Return arr_delay column alone as a data.table corresponding to origin = "LGA" and dest = "TPA" | c) Chaining | -- On the result obtained above, use chaining to order the column in decreasing order. | d) Compute or do in j | -- Find the maximum arrival delay corresponding to origin = "LGA" and dest = "TPA". | e) sub-assign by reference using := in j | f) Aggregation using by | -- Get the maximum departure delay for each month corresponding to origin = "JFK". Order the result by month | g) The mult argument | -- Subset only the first matching row where dest matches "BOS" and "DAY" | -- Subset only the last matching row where origin matches "LGA", "JFK", "EWR" and dest matches "XNA" | h) The nomatch argument | -- From the previous example, subset all rows only if there's a match | 3. Auto indexing
Benchmarking data.table6 months ago
fread: clear caches | subset: threshold for index optimization on compound queries | subset: index aware benchmarking | by reference operations | try to benchmark atomic processes | avoid class coercion | avoid microbenchmark(..., times=100) | multithreaded processing | inside a loop prefer set instead of := | inside a loop prefer setDT instead of data.table()
Efficient reshaping using data.tables6 months ago
Data | Introduction | 1. Default functionality | a) melting data.tables (wide to long) | - Convert DT to long form where each dob is a separate observation. | - Name the variable and value columns to child and dob respectively | b) dcasting data.tables (long to wide) | - How can we get back to the original data table DT from DT.m1? | - Starting from DT.m1, how can we get the number of children in each family? | 2. Limitations in previous melt/dcast approaches | Issues | 3. Enhanced (new) functionality | a) Enhanced melt | - melt multiple columns simultaneously | - Using patterns() | - Using measure() to specify measure.vars via separator or pattern | b) Enhanced dcast | - Casting multiple value.vars simultaneously | Multiple functions to fun.aggregate:
Frequently Asked Questions about data.table6 months ago
Beginner FAQs | Why do DT[ , 5] and DT[2, 5] return a 1-column data.table rather than vectors like data.frame? | Why does DT[,"region"] return a 1-column data.table rather than a vector? | Why does DT[, region] return a vector for the "region" column? I'd like a 1-column data.table. | Why does DT[ , x, y, z] not work? I wanted the 3 columns x,y and z. | I assigned a variable mycol="x" but then DT[, mycol] returns an error. How do I get it to look up the column name contained in the mycol variable? | What are the benefits of being able to use column names as if they are variables inside DT[...]? | OK, I'm starting to see what data.table is about, but why didn't you just enhance data.frame in R? Why does it have to be a new package? | Why are the defaults the way they are? Why does it work the way it does? | Isn't this already done by with() and subset() in base? | Why does X[Y] return all the columns from Y too? Shouldn't it return a subset of X? | What is the difference between X[Y] and merge(X, Y)? | Anything else about X[Y, sum(foo*bar)]? | That's nice. How did you manage to change it given that users depended on the old behaviour? | General Syntax | How can I avoid writing a really long j expression? You've said that I should use the column names, but I've got a lot of columns. | Why is the default for mult now "all"? | I'm using c() in j and getting strange results. | I have built up a complex table with many columns. I want to use it as a template for a new table; i.e., create a new table with no rows, but with the column names and types copied from my table. Can I do that easily? | Is a null data.table the same as DT[0]? | Why has the DT() alias been removed? | But my code uses j = DT(...) and it works. The previous FAQ says that DT() has been removed. | What are the scoping rules for j expressions? | Can I trace the j expression as it runs through the groups? | Inside each group, why are the group variables length-1? | Only the first 10 rows are printed, how do I print more? | With an X[Y] join, what if X contains a column called "Y"? | X[Z[Y]] is failing because X contains a column "Y". I'd like it to use the table Y in calling scope. | Can you explain further why data.table is inspired by A[B] syntax in base? | Can base be changed to do this then, rather than a new package? | I've heard that data.table syntax is analogous to SQL. | What are the smaller syntax differences between data.frame and data.table | I'm using j for its side effect only, but I'm still getting data returned. How do I stop that? | Why does [.data.table now have a drop argument from v1.5? | Rolling joins are cool and very fast! Was that hard to program? | Why does DT[i, col := value] return the whole of DT? I expected either no visible value (consistent with <-), or a message or return value containing how many rows were updated. It isn't obvious that the data has indeed been updated by reference. | OK, thanks. What was so difficult about the result of DT[i, col := value] being returned invisibly? | Why do I have to type DT sometimes twice after using := to print the result to console? | I've noticed that base::cbind.data.frame (and base::rbind.data.frame) appear to be changed by data.table. How is this possible? Why? | I've read about method dispatch (e.g. merge may or may not dispatch to merge.data.table) but how does R know how to dispatch? Are dots significant or special? How on earth does R know which function to dispatch and when? | Why do T and F behave differently from TRUE and FALSE in some data.table queries? | Questions relating to compute time | I have 20 columns and a large number of rows. Why is an expression of one column so quick? | I don't have a key on a large table, but grouping is still really quick. Why is that? | Why is grouping by columns in the key faster than an ad hoc by? | What are primary and secondary indexes in data.table? | Error messages | "Could not find function DT" | "unused argument(s) (MySum = sum(v))" | "translateCharUTF8 must be called on a CHARSXP" | cbind(DT, DF) returns a strange format, e.g. Integer,5 | "cannot change value of locked binding for .SD" | "cannot change value of locked binding for .N" | Warning messages | "The following object(s) are masked from package:base: cbind, rbind" | "Coerced numeric RHS to integer to match the column's type" | Reading data.table from RDS or RData file | General questions about the package | v1.3 appears to be missing from the CRAN archive? | Is data.table compatible with S-plus? | Is it available for Linux, Mac and Windows? | I think it's great. What can I do? | I think it's not great. How do I warn others about my experience? | I have a question. I know the r-help posting guide tells me to contact the maintainer (not r-help), but is there a larger group of people I can ask? | Where are the datatable-help archives? | I'd prefer not to post on the Issues page, can I mail just one or two people privately? | I have created a package that uses data.table. How do I ensure my package is data.table-aware so that inheritance from data.frame works?
Using .SD for Data Analysis6 months ago
What is .SD? | Loading and Previewing Lahman Data | .SD on Ungrouped Data | Column Subsetting: .SDcols | Column Type Conversion | Controlling a Model's Right-Hand Side | Conditional Joins | Grouped .SD operations | Group Subsetting | Group Optima | Grouped Regression
collapse and data.table6 months ago
Overview of Both Packages | Interoperating and some Do's and Dont's | Further collapse features supporting data.table's | Additional Benchmarks | References
collapse and dplyr6 months ago
1. Fast Aggregations | 1.1 Simple Aggregations | Excursus: What is Happening Behind the Scenes? | 1.2 More Speed using collapse Verbs | 1.3 Multi-Function Aggregations | 1.4 Weighted Aggregations | 2. Fast Transformations | 2.1 Fast Transform and Compute Variables | 2.2 Replacing and Sweeping out Statistics | 2.3 More Control using the TRA Function | 2.4 Faster Centering, Averaging and Standardizing | 2.5 Lags / Leads, Differences and Growth Rates | 3. Benchmarks | 3.1 Data | 3.1 Selecting, Subsetting, Ordering and Grouping | 3.1 Aggregation | 3.2 Transformation | References
collapse and plm6 months ago
Part 1: Fast Transformation of Panel Data | 1.1 Between and Within Transformations | 1.2 Higher-Dimensional Between and Within Transformations | 1.3 Scaling and Centering | 1.4 Panel Lags / Leads, Differences and Growth Rates | 1.5 Panel Data to Array Conversions | Benchmarks | Part 2: Fast Exploration of Panel Data | 2.1 Variation Check for Panel Data | 2.2 Summary Statistics for Panel Data | 2.3 Exploring Panel Data in Matrix / Array Form | 2.4 Panel- Auto-, Partial-Auto and Cross-Correlation Functions | 2.5 Testing for Individual Specific and Time-Effects | Part 3: Programming Panel Data Estimators | References
collapse and sf6 months ago
Summarising sf Data Frames | Selecting Columns and Subsetting | Aggregation and Grouping | Indexing | Unique Values, Ordering, Splitting, Binding | Transformations | Conversion to and from sf | Support for units | Conclusion
collapse for tidyverse Users6 months ago
Namespace and Global Options | Using the Fast Statistical Functions | Writing Efficient Code | Using Internal Grouping | Conclusion
collapse's Handling of R Objects6 months ago
Overview | General Principles | Specific Functions and Classes | Object Conversions | Selecting Columns by Data Type | Parsing of Time-IDs | xts/zoo Time Series | Support for sf and units | Support for data.table | Class-Agnostic Grouped and Indexed Data Frames | Conclusion
Developing with collapse6 months ago
Introduction | Point 1: Be Minimalistic in Computations | Point 2: Think About Memory and Optimize | Point 3: Internally Favor Primitive R Objects and Functions | Some Notes on Global Options | Conclusion
Introduction to collapse6 months ago
Why collapse? | 1. Data and Summary Tools | 1.1 wlddev - World Bank Development Data | 1.2 GGDC10S - GGDC 10-Sector Database | 2. Fast Data Manipulation | 2.1 Selecting and Replacing Columns | 2.2 Subsetting | 2.3 Reordering Rows and Columns | 2.4 Transforming and Computing New Columns | 2.5 Adding and Binding Columns | 2.6 Renaming Columns | 2.7 Using Shortcuts | 2.8 Missing Values / Rows | 2.9 Unique Values / Rows | 2.10 Recoding and Replacing Values | 3. Quick Data Object Conversions | 4. Advanced Statistical Programming | 4.1 Fast (Grouped, Weighted) Statistical Functions | 4.2 Factors, Grouping Objects and Grouped Data Frames | 4.3 Grouped and Weighted Computations | 4.4 Transformations Using the TRA Argument | 5. Advanced Data Aggregation | 6. Data Transformations | 6.1 Row and Column Arithmetic | 6.1 Row and Column Data Apply | 6.2 Split-Apply-Combine Computing | 6.3 Fast (Grouped) Replacing and Sweeping-out Statistics | 6.4 Fast Standardizing | 6.5 Fast Centering and Averaging | 6.6 HD Centering and Linear Prediction | 7. Time Series and Panel Series | 7.1 Panel Series to Array Conversions | 7.2 Panel Series ACF, PACF and CCF | 7.3 Fast Lags and Leads | 7.4 Fast Differences and Growth Rates | 8. List Processing and a Panel-VAR Example | 8.1 List Search and Identification | 8.2 List Subsetting | 8.3 Recursive Apply and Unlisting in 2D | Going Further | References
Summarizing gridded population data 7 months ago
Introduction | Loading the sample data | Calculating total population | Calculating population from the GPW population count file | Calculating population from the GPW population density file | Population-weighted statistics
Summarizing categorical data 7 months ago
Introduction | Loading the sample data | Summarizing land cover classifications | Summary functions | Summarizing population land cover
Translations7 months ago
Data types | Verbs | Functions within verbs | Parentheses | Comparison operators | Basic arithmetics | Math functions | Logical operators | Branching and conversion | String manipulation | Date manipulation | Aggregation | Shifting | Ranking | Special cases | Contributing | Known incompatibilities | Output order stability | sum() | Empty vectors in aggregate functions | min() and max() for logical input | n_distinct() and multiple arguments | is.na() and NaN values | Row names | Other differences
tidyCpp Motivation7 months ago
title: "tidyCpp Motivation"author: "Dirk Eddelbuettel"date: "Initial version November 2020; Updated August 2021 and November 2025"css: "water.css" | Introducing tidyCpp | Snippet One: dimnames | Using the C API for R | Using tidyCpp | Snippet Two: convolution | Snippet Three: uchardet | Snippet Four: Rolling min and max | Using the Rcpp version | PROTECT and UNPROTECT | Discussion | Summary
mirai - Communications Backend for R7 months ago
1. Mirai Parallel Clusters | 2. Foreach Support
mirai - OpenTelemetry7 months ago
1. Introduction | 2. Automatic Tracing Setup | 3. Span Types and Hierarchy | 3.1 Core Span Types | 3.2 Span Relationships and Context Propagation | 4. Status and Error Tracking | 5. Monitoring and Observability | 6. Integration with Observability Platforms
mirai - Serialization (Arrow, ADBC, polars, torch)7 months ago
1. Serialization: Arrow, polars and beyond | 2. Serialization: Torch | 3. Database Hosting using Arrow Database Connectivity | 4. Shiny / mirai / DBI / ADBC Integrated Example
Using ggplot2 in packages7 months ago
Referring to ggplot2 functions | Using aes() and vars() in a package function | Best practices for common tasks | Using ggplot2 to visualize an object | Creating a new theme | Testing ggplot2 output | ggplot2 in Suggests | Read more
Aesthetic specifications8 months ago
Colour and fill | Lines | Line type | Linewidth | Line end/join paramters | Polygons | Point | Shape | Text | Font family | Font face | Font size | Justification
Extending ggplot28 months ago
ggproto | Creating a new stat | The simplest stat | Stat parameters | Picking defaults | Variable names and default aesthetics | Exercises | Creating a new geom | A simple geom | Collective geoms | Inheriting from an existing Geom | Geoms and Stats with multiple orientation | Omnidirectional stats | Omnidirecitonal geoms | Dealing with required aesthetics | Ambiguous layers | Creating your own theme | Overriding elements | Global elements | Complete vs incomplete | Creating a new faceting | Creating a layout specification | Mapping data into panels | Laying out the panels | Assembling the Facet class | Doing more with facets | Extending existing facet function | Creating new guides | Overriding scale extraction | Guide constructors | Custom drawings
Introduction to ggplot28 months ago
Data | Mapping | Layers | Scales | Facets | Coordinates | Theme | Combining
Profiling Performance8 months ago
Performance focused changes across versions | vr packageVersion('ggplot2') | v3.1.0
parallelDist vignette9 months ago
Introduction | Performance | Quick start
Memory protection: controlling automatic materialization9 months ago
Introduction | Eager and lazy computation | Example | Comparison | Prudence | Concept | Enforcing DuckDB operation | From stingy to lavish | Thrift | File ingestion and custom limits | Conclusion
Rcpp-attributes11 months ago
Using Attributes | Package Development
Rcpp-extending11 months ago
Introduction | Extending Rcpp::wrap | Extending Rcpp::as | Summary
Rcpp-FAQ11 months ago
Getting started | Compiling and Linking | Examples | Support | Known Issues
Rcpp-introduction11 months ago
Introduction | First Steps with | A first function using | Extending via its API | Extending via the API of | Data Driven Performance Decisions with | Random Numbers within : An Example of Rcpp Sugar | Translating Code from into : Bootstrap Example | Using as an Interface to External Libraries: Exploring Linear Algebra Extensions | in Packages | Conclusion
Rcpp-JSS-201111 months ago
Introduction | The Rcpp API | R and C++ data interchange | Function calls | Using code `inline' | Using Standard Template Library algorithms | Error handling | Performance comparison | On-going development | Summary
Rcpp-libraries11 months ago
Introduction
Rcpp-modules11 months ago
Motivation | Rcpp modules | Using modules in other packages | Future extensions | Known shortcomings | Summary
Rcpp-package11 months ago
Introduction | Using Rcpp.package.skeleton | Using modules | Further examples | Other compilers | Summary
Rcpp-quickref11 months ago
Important Notes
Rcpp-sugar11 months ago
Motivation | Operators | Functions | Performance | Implementation | Summary
Optimize polars performance11 months ago
Lazy vs eager execution | Order of operations | How does polars help? | Use the streaming engine | Use polars functions
introduction 1 years ago
Reading a satellite image | Switching attributes to dimensions and back | Subsetting | Overviews | Reading a raster time series: NetCDF | Reading datasets from multiple files | Writing stars objects to disk | Cropping a raster's extent | Vector data cube example | OD: space x space x travel mode x time x time | Extracting at point locations, aggregating over polygons
stars data model 1 years ago
Stars objects | Grid type | Regular grids | Raster attributes, rotated and sheared grids | Rectilinear grids | Curvilinear grids
Classification Metrics1 years ago
Computing classification metrics | Computing weighted classification metrics
Regression Metrics1 years ago
Computing regression metrics
Use data.table the tidy way: An ultimate tutorial of tidyfst1 years ago
Create example data | Basic operations | Filter rows | Sort rows | Select columns | Summarise data | group computation (by) | Going further | Advanced columns manipulation | Advanced use of by | Miscellaneous | Read / Write data | Reshape data | Other | Join/Bind data sets | Join | Bind | Set operations | Summary
On collinearity1 years ago
What collinearity is | This document's definitions | Why collinearity can be a problem | Technical reason | Substantial reason | When is collinearity a problem? | The model is misspecified | Example 1: Gender gap in publications | Example 2: Sneaky misspecification | Econometrics software and collinearity | Detecting collinearity: Automatic variable removal algorithms | Collinearity is a numerical problem | When automatic removal is good | When automatic removal bites
Interoperability with DuckDB and dbplyr1 years ago
Introduction | From duckplyr to dbplyr | Call arbitrary functions in duckplyr | Conclusion
Large data1 years ago
Introduction | To duckplyr | From files | From DuckDB | Materialization | To files | Memory usage | The big picture
Fallback to dplyr1 years ago
Introduction | DuckDB mode | Relation objects | Help from dplyr | Enforce DuckDB operation | Configure fallbacks | Conclusion
Selective use of duckplyr1 years ago
Introduction | External data with explicit qualification | Restoring dplyr methods | Own data | In other packages
Telemetry1 years ago
Implementer's interface1 years ago
Do more with dates and times in R2 years ago
Parsing dates and times | Setting and Extracting information | Time Zones | Time Intervals | Arithmetic with date times | If anyone drove a time machine, they would crash | Vectorization | Further Resources
Introduction2 years ago
Links | Overview | vlookup & xlookup | More examples | Variable selection in the expressions | Joins
Using qs2 years ago
Usage | Installation | Features | Summary Benchmarks | Serializing | De-serializing | ALTREP character vectors | Byte shuffle | Serializing to memory | Serializing objects to ASCII | Using qs within Rcpp | Future developments
Fastest data operations with least memory in tidy syntax2 years ago
Why tidyft? | The philosophy of tidyft | Working with fst | Performance | Session Information
Converting from Rcpp2 years ago
Getting started | Cheatsheet | Vectors | Other objects | Functions | R functions | Unsupported Rcpp features | RNGs | Common issues when converting | STL includes | Strict headers | R API includes | Type aliases | Logical vector construction
Introduction to the fastverse2 years ago
Extending the fastverse for the Session | Permanent Extensions | Custom fastverse Configurations for Projects | Creating Separate Package-Verses | Dependencies, Situational Reports and Updating | Other fastverse Options | Conclusion | Appendix: A note on OpenMP Multithreading
C++ API2 years ago
Setting seed and RNG type | Random variates with uniform distribution | Random variates with normal distribution | Random variates with exponential distribution | Random variates with Rademacher distribution | Random sampling | Getting and setting the RNG state | Accessing the global RNG
Parallel RNG usage2 years ago
Threefry: usage from R | Xo(ro)shiro: jump ahead with OpenMP | PCG: multiple streams with RcppParallel | Using the global RNG
Fast Pseudo Random Number Generators for R2 years ago
Supported Random Number Generators | Usage from R | Usage from C++ | Using the compiled library functions | Using the header only library | Accessing the global RNG
Performance2 years ago
Q1 | Q2 | Q3 | Q4 | Q5 | Last words | Session information
Miscellaneous 2 years ago
What is this EPSG code all about? | Why should we use OGC:CRS84 instead of EPSG:4326? | How does sf deal with secondary geometry columns? | Does st_simplify preserve topology? | Why do my dplyr verbs not work for sf objects?
Introducing MatrixExtra2 years ago
Sparse Matrix Formats | 1. COO (coordinate) or triplets, a.k.a. "TsparseMatrix": | 2. CSR (compressed sparse row), a.k.a. "RsparseMatrix" | 3. CSC (compressed sparse column), a.k.a. "CsparseMatrix" | 4. Sparse vectors | Sparse objects in Matrix | Doesn't Matrix provide everything? | Why is CSR needed? | MatrixExtra to the rescue | Important!! | What else does it do? | Modifying sub-optimal behaviors from Matrix | A real-world example
Prototypes and sizes3 years ago
Prototype | Base prototypes | Coercing to common type | Casting to specified type | Size | Slicing | Common sizes: recycling rules | Appendix: recycling in base R
Fast sampling methods3 years ago
Benchmarks | Technicalities
Guide to odin docs3 years ago
The packages | Documentation | The TypeScript ecosystem | Roadmap
xts FAQ3 years ago
Contents
Low-level scattermore API3 years ago
Low-level interface of Scattermore | Plotting data as densities | Plotting data as colored pixels | Expanding densities and RGBWT plots | Coloring densities | Merging RGBWT and RGBA layers | Exporting high-quality graphics
odin3 years ago
Single variable: Logistic growth | Specifying parameters | More than one variable: the Lorenz attractor | Delay models | Arrays | Generalised Lotka-Volterra model | Interpolating functions
Examples and Recipes3 years ago
The current local time | The current time somewhere else | Set a meeting across time zones | High level API | Force a specific time zone | Finding the next Monday (or Thursday) | Generate sequences of dates and date-times | Grouping by months or quarters | Flooring by days | Day of the year | Computing an age in years | Computing number of weeks since the start of the year | Compute the number of months between two dates | Computing the ISO year or week | Computing the Epidemiological year or week | Converting a time zone abbreviation into a time zone name | When is the next daylight saving time event?
Frequently Asked Questions3 years ago
Why can't I do day arithmetic on a year-month-day? | Why can't I add time to a zoned-time? | Where did my POSIXct subseconds go? | What is the time zone of Date? | What does clock do with leap seconds? | Why doesn't this work with data.table?
Setting up a Rust build environment3 years ago
debugging3 years ago
Using print() | print format strings | Conditional display | Controlling precision | Current limitations
Type and size stability3 years ago
Definitions | Examples | c() and vctrs::vec_c() | Atomic vectors | Incompatible vectors and non-vectors | Factors | Date-times | Dates and date-times | Missing values | Data frames | Matrices and arrays | Implementation | ifelse()
NetCDF Proxy Workflows 3 years ago
cppRouting4 years ago
Package presentation | Main functions | Routing algorithms | Traffic assignment algorithms | All-or-Nothing (AON) | User Equilibrium (UE) | Examples and applications using cppRouting
odin discrete models4 years ago
Discrete compartmental models in a nutshell | From continuous to discrete time | Stochastic processes | Binomial distribution | Poisson distribution | Multinomial distribution | Implementation using odin | Deterministic SIR model | Stochastic SIR model | A stochastic SEIRDS model
odin functions4 years ago
Basic operators | Array support | Operators | Mathematical operators | Stochastic models
Using table.express4 years ago
Preliminaries | Expression delimiters | Arranging rows | Selecting columns | Transmuting columns | Summarizing columns | Mutating columns | Filtering rows | Using keys or secondary indices | Modifying subset of data | Data manipulation by group | Distinct combinations of columns | Lazy considerations | Nesting expressions | Automatic expression chaining | Explicit chaining | Eager verbs | As simple as possible
Printing vectors nicely in tibbles4 years ago
Prerequisites | Using in a tibble | Fixing the data type | Custom rendering | Truncation | Adaptive rendering | Testing
rrapply: cheat sheet4 years ago
Example 1: Basic usage4 years ago
Use tidyfst just like dplyr | Filter rows with filter_dt() | Arrange rows with arrange_dt() | Select columns with select_dt() | Add new columns with mutate_dt() | Summarise values with summarise_dt() | Randomly sample rows with sample_n_dt() and sample_frac_dt() | Grouped operations | Comparison with data.table syntax | Data | Subset rows | Select column(s) | Mixed computation | Refer to columns by names | Aggregations
Example 2: Join tables4 years ago
Controlling how the tables are matched | Types of join | Filtering joins | Set operations
Example 3: Reshape4 years ago
Longer | Wider | More complicated example
Example 4: Nest4 years ago
Example 5: Fst4 years ago
Example 6: Dt4 years ago
ggrastr5 years ago
Rasterizing ggplot objects with rasterize | Rasterizing individual layers | Advanced options | Selecting rendering device | Scaling size of raster objects | Rasterize multiple layers with lists | Set the parameter 'dpi' globally with options(ggrastr.default.dpi=N) | Other wrapper functions
Legacy (outdated) wrapper functions5 years ago
Points: Rasterize scatter plots with geom_point_rast() | Jitter: Rasterize jittered scatter plots with geom_jitter_rast() | Tiles: Rasterize heatmaps with geom_tile_rast() | Violin plots: Rasterize violin plots with geom_violin_rast() | Box plots: Jitter outliers and rasterize box plots with geom_boxplot_jitter | Beeswarm-style plots: geom_beeswarm_rast and geom_quasirandom
Joining verbs for data.table5 years ago
Basic joins | Expression chaining | Mutating join | Rolling joins | Non-equi joins | Self joins
Getting Started5 years ago
Building | Parsing | Parsing dates | Parsing date-times | date_time_parse() | date_time_parse_complete() | date_time_parse_abbrev() | date_time_parse_RFC_3339() | Grouping, rounding and shifting | Grouping | Rounding | Shifting | Arithmetic | Getting and setting
Integation with grid5 years ago
Introducing magrittr6 years ago
Abstract | Introduction and basics | Additional pipe operators | Aliases | Development
Design tradeoffs6 years ago
Code transformation | Desired properties | Implications of design decisions | Placeholder binding | Masking environment | Laziness | Numbered placeholders | Three implementations | Nested pipe | Multiple placeholders r fail() | Lazy evaluation r pass() | Persistence and eager unbinding r pass() | Progressive stack r fail() | Lexical effects r pass() | Continuous stack r pass() | Eager lexical pipe | Multiple placeholders r pass() | Lazy evaluation r fail() | Persistence: r fail() | Eager unbinding: r pass() | Progressive stack: r pass() | Lexical effects and continuous stack: r pass() | Lazy masking pipe | Persistence: r pass() | Progressive stack: r fail() | Lexical effects r fail() | Continuous stack r fail()
tidyfst包实例分析6 years ago
测试数据构造 | 基础 | 小技巧 | 聚合 | 1.求每种切割类型、每种颜色钻石的平均价格、中位数价格与最高价格 | 2.求每天最高出售价格对应的那笔订单 | join | 1.dat1与dat2以dt列左连接 | 2.多重join | 长宽表转换 | 1.长表转宽表 | 2.宽表转长表 | 高阶 | 向上/下填充空值 | 添加子维度聚合结果为新列 | 1.以dat1为例,添加两列,一列为以cut、color聚合求price的均值,另一列是求标准差 | 2.以dat1为例,以dt分组添加一列序号id | 移动函数 | 系统参数
matrixStats: Summary of functions7 years ago
Introducing the snakecase package7 years ago
Import | Graphics | Export | Further information
xts: Extensible Time Series7 years ago
Introduction | The structure of xts | Using the xts package | Developing with xts | Customizing and Extending xts | Conclusion
Algorithms and Benchmarks for the coop Package7 years ago
Introduction | The Algorithms with Notes on Implementation | Benchmarks | References
Introducing coop: Fast Covariance, Correlation, and Cosine Operations7 years ago
Introduction | Choice of BLAS Library | The Operations | References
Data Transfer8 years ago
RJournal 6 111-122 (2014)8 years ago
stringdist C/C++ API8 years ago
Case converters8 years ago
Basic examples
Julia in RMarkdown9 years ago
JuliaCall in Jupyter R Notebook9 years ago