Skip to content

Commit

Permalink
Switch to README.Rmd style
Browse files Browse the repository at this point in the history
Do not forget to compile README.Rmd to README.md before commits/releases
  • Loading branch information
nicebread committed Dec 13, 2018
1 parent a42cf09 commit 341f645
Show file tree
Hide file tree
Showing 3 changed files with 133 additions and 12 deletions.
4 changes: 3 additions & 1 deletion .Rbuildignore
Expand Up @@ -7,4 +7,6 @@ checks
.Rapp.history
.travis.yml
cran-comments.md
internal_files
internal_files
^README\.Rmd$
^README-.*\.png$
110 changes: 110 additions & 0 deletions README.Rmd
@@ -0,0 +1,110 @@
---
output:
md_document:
variant: gfm
---

<!-- README.md is generated from README.Rmd. Please edit that file
rmarkdown::render("README.rmd")
-->

```{r, echo = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "README-"
)
```


[![Build Status](https://travis-ci.org/nicebread/RSA.svg?branch=master)](https://travis-ci.org/nicebread/RSA)
[![Last-changedate](https://img.shields.io/badge/last%20change-`r gsub('-', '--', Sys.Date())`-yellowgreen.svg)](/commits/master)
```{r, echo = FALSE}
version <- as.vector(read.dcf('DESCRIPTION')[, 'Version'])
version <- gsub('-', '.', version)
```
[![packageversion](https://img.shields.io/badge/Package%20version-`r version`-orange.svg?style=flat-square)](commits/master)
![](http://cranlogs.r-pkg.org/badges/RSA)

RSA
===

An R package for Response Surface Analysis

## Installation
The stable CRAN version can be installed by:

install.packages("RSA", dependencies=TRUE)

The current development version can be installed by:

install.packages(c("devtools", "lavaan", "plyr", "ggplot2", "lattice", "tkrplot", "RColorBrewer", "rgl", "gridExtra", "aplpack", "fields", "SDMTools", "qgraph", "AICcmodavg"), dependencies=TRUE)
library(devtools)
install_github("nicebread/RSA")


## Information

* An email list for asking questions related to the RSA-package has been created at Google groups: https://groups.google.com/forum/?fromgroups&hl=en#!forum/rsa-in-r


## Demo script (with built-in data set)

# if not already done:
# install the RSA package
# (only has to be done once)
# install.packages("RSA")

# load the RSA package for
# the active session
library(RSA)

# open the help page
?RSA

## Motive congruency example
# load the built-in data set
data(motcon)

# Compute the RSA and save the result
# into the new variable r1
r1 <- RSA(postVA ~ ePow * iPow, data=motcon)

# Show summary of the RSA
print(r1)

# Compare all models
compare(r1, plot=TRUE)
aictab(r1, plot=TRUE)

# Show all RSA parameters with parametric
# SEs, p values, and CIs
getPar(r1, "coef", model="RR")

# Standard CIs
c1 <- confint(r1, model="RR")
c1

# Get bootstrapped confidence intervals
# (5000 bootstrap replications),
# only from the RR model
c2 <- confint(r1, model="RR", method="boot", R=5000)
c2

# Plot the final model
plot(r1, model="RR",
xlab="Explicit power motive",
ylab="Implicit power motive",
zlab="Affective valence")

## Additional functions
# contour plot
plot(r1, model="RR", type="contour")

# interactive, rotatable 3d plot
plot(r1, model="RR", type="interactive")

# open an interactive widget with control
# sliders for regression weights
demoRSA()
31 changes: 20 additions & 11 deletions README.md
@@ -1,30 +1,39 @@
[![Build Status](https://travis-ci.org/nicebread/RSA.svg?branch=master)](https://travis-ci.org/nicebread/RSA)
<!-- README.md is generated from README.Rmd. Please edit that file
rmarkdown::render("README.rmd")
-->

[![Build
Status](https://travis-ci.org/nicebread/RSA.svg?branch=master)](https://travis-ci.org/nicebread/RSA)
[![Last-changedate](https://img.shields.io/badge/last%20change-2018--12--13-yellowgreen.svg)](/commits/master)

RSA
===
[![packageversion](https://img.shields.io/badge/Package%20version-0.9.13-orange.svg?style=flat-square)](commits/master)
![](http://cranlogs.r-pkg.org/badges/RSA)

# RSA

An R package for Response Surface Analysis

## Installation

The stable CRAN version can be installed by:

install.packages("RSA", dependencies=TRUE)

The current development version can be installed by:
The current development version can be installed
by:

install.packages(c("devtools", "lavaan", "plyr", "ggplot2", "lattice", "tkrplot", "RColorBrewer", "rgl", "gridExtra", "aplpack", "fields", "SDMTools", "qgraph", "AICcmodavg"), dependencies=TRUE)
install.packages(c("devtools", "lavaan", "plyr", "ggplot2", "lattice", "tkrplot", "RColorBrewer", "rgl", "gridExtra", "aplpack", "fields", "SDMTools", "qgraph", "AICcmodavg"), dependencies=TRUE)
library(devtools)
install_github("nicebread/RSA")


## Information

* An email list for asking questions related to the RSA-package has been created at Google groups: https://groups.google.com/forum/?fromgroups&hl=en#!forum/rsa-in-r

- An email list for asking questions related to the RSA-package has
been created at Google groups:
<https://groups.google.com/forum/?fromgroups&hl=en#!forum/rsa-in-r>

## Demo script (with built-in data set)

# if not already done:
# install the RSA package
# (only has to be done once)
Expand All @@ -50,7 +59,7 @@ The current development version can be installed by:

# Compare all models
compare(r1, plot=TRUE)
aictab(r1, plot=TRUE)
aictab(r1, plot=TRUE)

# Show all RSA parameters with parametric
# SEs, p values, and CIs
Expand All @@ -68,7 +77,7 @@ The current development version can be installed by:

# Plot the final model
plot(r1, model="RR",
xlab="Explicit power motive",
xlab="Explicit power motive",
ylab="Implicit power motive",
zlab="Affective valence")
Expand Down

0 comments on commit 341f645

Please sign in to comment.