Development

Development

1996 bookmarks
Newest
rcrd (record) S3 class — new_rcrd
rcrd (record) S3 class — new_rcrd
The rcrd class extends vctr. A rcrd is composed of 1 or more fields, which must be vectors of the same length. Is designed specifically for classes that can naturally be decomposed into multiple vectors of the same length, like POSIXlt, but where the organisation should be considered an implementation detail invisible to the user (unlike a data.frame).
·vctrs.r-lib.org·
rcrd (record) S3 class — new_rcrd
Guest Blog: Reproducible Data Pipelines In R With {targets} - ESIP
Guest Blog: Reproducible Data Pipelines In R With {targets} - ESIP
Reproducibility is a huge challenge in science, especially as datasets grow larger and workflows become more complex. Enter targets — an R package that helps
A data workflow is the series of steps that turn raw data into something meaningful — think downloading, cleaning, analyzing and visualizing. You might already do this in R with a mix of scripts and notebooks. Some steps in your data workflow may also be manual and require no coding, such as data processing in Excel or uploading model output data to OneDrive. A data pipeline, on the other hand, is an automated version of that workflow. It ensures that every step happens in order, only the necessary steps are rerun when data changes, and guarantees the results are reproducible every time. A well-structured pipeline ensures that anyone revisiting the analysis — including your future self — can rerun, verify and build on the work without extra effort or missing pieces.
·esipfed.org·
Guest Blog: Reproducible Data Pipelines In R With {targets} - ESIP
PostgreSQL Foreign Key
PostgreSQL Foreign Key
In this tutorial, you will learn about PostgreSQL foreign key and how to add foreign keys to tables using foreign key constraints.
The following illustrates a foreign key constraint syntax: [CONSTRAINT fk_name] FOREIGN KEY(fk_columns) REFERENCES parent_table(parent_key_columns) [ON DELETE delete_action] [ON UPDATE update_action]
In this syntax: First, specify the name for the foreign key constraint after the CONSTRAINT keyword. The CONSTRAINT clause is optional. If you omit it, PostgreSQL will assign an auto-generated name. Second, specify one or more foreign key columns in parentheses after the FOREIGN KEY keywords. Third, specify the parent table and parent key columns referenced by the foreign key columns in the REFERENCES clause. Finally, specify the desired delete and update actions in the ON DELETE and ON UPDATE clauses.
Since the primary key is rarely updated, the ON UPDATE action is infrequently used in practice. We’ll focus on the ON DELETE action.
PostgreSQL supports the following actions: SET NULL SET DEFAULT RESTRICT NO ACTION CASCADE
·neon.tech·
PostgreSQL Foreign Key
PostgreSQL Copy Table: A Step-by-Step Guide
PostgreSQL Copy Table: A Step-by-Step Guide
In this tutorial, you will learn how to copy an existing table to a new one using various PostgreSQL copy table statements.
To copy a table completely, including both table structure and data, you use the following statement: CREATE TABLE new_table AS TABLE existing_table;
·neon.tech·
PostgreSQL Copy Table: A Step-by-Step Guide
PostgreSQL Temporary Table
PostgreSQL Temporary Table
You will learn about the PostgreSQL temporary table and how to manage it using the CREATE TEMP TABLE and DROP TABLE statements.
When to use temporary tables Isolation of data: Since the temporary tables are session-specific, different sessions or transactions can use the same table name for temporary tables without causing a conflict. This allows you to isolate data for a specific task or session. Intermediate storage: Temporary tables can be useful for storing the intermediate results of a complex query. For example, you can break down a complex query into multiple simple ones and use temporary tables as the intermediate storage for storing the partial results. Transaction scope: Temporary tables can be also useful if you want to store intermediate results within a transaction. In this case, the temporary tables will be visible only to that transaction
·neon.tech·
PostgreSQL Temporary Table
PostgreSQL Generated Columns
PostgreSQL Generated Columns
In this tutorial, you will learn about PostgreSQL generated columns whose values are automatically calculated from other columns.
In PostgreSQL, a generated column is a special type of column whose values are automatically calculated based on expressions or values from other columns. A generated column is referred to as a computed column in the SQL Server or a virtual column in Oracle .
There are two kinds of generated columns: Stored: A stored generated column is calculated when it is inserted or updated and occupies storage space. Virtual: A virtual generated column is computed when it is read and does not occupy storage space.
A virtual generated column is like a view, whereas a stored generated column is similar to a materialized view. Unlike a material view, PostgreSQL automatically updates data for stored generated columns.
PostgreSQL currently implements only stored generated columns.
·neon.tech·
PostgreSQL Generated Columns
PostgreSQL Sequences
PostgreSQL Sequences
In this tutorial, you will learn about the PostgreSQL sequences and how to use a sequence object to generate a sequence of numbers.
In PostgreSQL, a sequence is a database object that allows you to generate a sequence of unique integers. Typically, you use a sequence to generate a unique identifier for a primary key in a table. Additionally, you can use a sequence to generate unique numbers across tables. To create a new sequence, you use the CREATE SEQUENCE statement.
Listing all sequences in a database To list all sequences in the current database, you use the following query: SELECT relname sequence_name FROM pg_class WHERE relkind = 'S';
·neon.tech·
PostgreSQL Sequences
PostgreSQL Identity Column
PostgreSQL Identity Column
This tutorial shows you how to use the GENERATED AS IDENTITY constraint to create the PostgreSQL identity column for a table.
PostgreSQL version 10 introduced a new constraint GENERATED AS IDENTITY that allows you to automatically assign a unique number to a column.
The GENERATED AS IDENTITY constraint is the SQL standard-conforming variant of the good old SERIAL column.
The following illustrates the syntax of the GENERATED AS IDENTITY constraint: column_name type GENERATED { ALWAYS | BY DEFAULT } AS IDENTITY[ ( sequence_option ) ]
In this syntax: The type can be SMALLINT, INT, or BIGINT. The GENERATED ALWAYS instructs PostgreSQL to always generate a value for the identity column. If you attempt to insert (or update) values into the GENERATED ALWAYS AS IDENTITY column, PostgreSQL will issue an error. The GENERATED BY DEFAULT instructs PostgreSQL to generate a value for the identity column. However, if you supply a value for insert or update, PostgreSQL will use that value to insert into the identity column instead of using the system-generated value.
PostgreSQL allows a table to have more than one identity column. Like the SERIAL, the GENERATED AS IDENTITY constraint also uses the SEQUENCE object internally.
To fix the error, you can use the OVERRIDING SYSTEM VALUE clause as follows: INSERT INTO color (color_id, color_name) OVERRIDING SYSTEM VALUE VALUES(2, 'Green');
Alternatively, you can use GENERATED BY DEFAULT AS IDENTITY instead.
Because the GENERATED AS IDENTITY constraint uses the SEQUENCE object, you can specify the sequence options for the system-generated values.
For example, you can specify the starting value and the increment as follows: DROP TABLE color; CREATE TABLE color ( color_id INT GENERATED BY DEFAULT AS IDENTITY (START WITH 10 INCREMENT BY 10), color_name VARCHAR NOT NULL );
In this example, the system-generated value for the color_id column starts with 10 and the increment value is also 10.
·neon.tech·
PostgreSQL Identity Column
Retrieval-Augmented Generation (RAG) Workflows
Retrieval-Augmented Generation (RAG) Workflows
Provides tools for implementing Retrieval-Augmented Generation (RAG) workflows with Large Language Models (LLMs). Includes functions for document processing, text chunking, embedding generation, storage management, and content retrieval. Supports various document types and embedding providers (Ollama, OpenAI), with DuckDB as the default storage backend. Integrates with the ellmer package to equip chat objects with retrieval capabilities. Designed to offer both sensible defaults and customization options with transparent access to intermediate outputs.
·tidyverse.github.io·
Retrieval-Augmented Generation (RAG) Workflows
My LLM codegen workflow atm
My LLM codegen workflow atm
A detailed walkthrough of my current workflow for using LLms to build software, from brainstorming through planning and execution.
·harper.blog·
My LLM codegen workflow atm
Github-Ranking/Top100/R.md at master · EvanLi/Github-Ranking
Github-Ranking/Top100/R.md at master · EvanLi/Github-Ranking
:star:Github Ranking:star: Github stars and forks ranking list. Github Top100 stars list of different languages. Automatically update daily. | Github仓库排名,每日自动更新 - EvanLi/Github-Ranking
·github.com·
Github-Ranking/Top100/R.md at master · EvanLi/Github-Ranking
reg.finalizer function - RDocumentation
reg.finalizer function - RDocumentation
Registers an R function to be called upon garbage collection of object or (optionally) at the end of an R session.
·rdocumentation.org·
reg.finalizer function - RDocumentation
⚾ Fantasy League Lineup Pro 🏆-Free AI-Powered Fantasy Baseball
⚾ Fantasy League Lineup Pro 🏆-Free AI-Powered Fantasy Baseball
Optimize your fantasy baseball lineup with ⚾ Fantasy League Lineup Pro 🏆. Utilize AI for player analysis, real-time updates, and strategic lineup decisions in a user-friendly interface.
·yeschat.ai·
⚾ Fantasy League Lineup Pro 🏆-Free AI-Powered Fantasy Baseball
https://blog.routinehub.co/ai-store-the-ultimate-hub-for-discovering-ai-shortcuts/
https://blog.routinehub.co/ai-store-the-ultimate-hub-for-discovering-ai-shortcuts/
For AI shortcut enthusiasts, the tool that will help you stay up-to-date with all the available AI shortcuts has finally arrived. AI Store, developed by @__MIKL__, is the ultimate tool for exploring, downloading, and managing the latest AI projects within the RoutineHub community. With AI Store, you have instant access to a constantly growing database, directly from your device, without the need to search through multiple sources. AI Store AI Store allows users to view AI-based shortcuts, s
·blog.routinehub.co·
https://blog.routinehub.co/ai-store-the-ultimate-hub-for-discovering-ai-shortcuts/