8000 GitHub - no0p/base_data: script to copy r data() to tables
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

no0p/base_data

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 

Repository files navigation

rdatapop

This create tables in Postgresql based on data sets from the data() function in R.

Usage

Edit the database connection details in the script. The run the script:

Rscript pgdata.r

The script will populate tables in an rdata schema.

Dependencies

The script obviously requires the R environment which can be installed on ubuntu systems with:

sudo apt-get install r-base-core

Additionally it requires the RPostgresql package to be installed, which can be installed with the following R command:

> install.packages("RPostgreSQL")

Tables

The script creates a number of interesting data tables.

=# \d
                    List of relations
 Schema |             Name             |   Type   | Owner  
--------+------------------------------+----------+--------
 rdata  | ability_cov                  | table    | robert
 rdata  | airmiles                     | table    | robert
 rdata  | airpassengers                | table    | robert
 rdata  | airquality                   | table    | robert
 rdata  | anscombe                     | table    | robert
 rdata  | attenu                       | table    | robert
 rdata  | attitude                     | table    | robert
 ...
 (214 rows)

These tables are great for test data.

This data was used as a basis for prototyping a modeling Postgresql background worker experiment and as examplars when developing plotpg.

About

script to copy r data() to tables

Resources

Stars

Watchers

Forks

Releases

No releases published
30D8

Packages

No packages published

Languages

0