Skip to content

Commit

Permalink
Fixed demanif.* data problems due to NA rownames
Browse files Browse the repository at this point in the history
  • Loading branch information
conjugateprior committed Apr 25, 2015
1 parent 39a12a1 commit 9a57cc4
Show file tree
Hide file tree
Showing 46 changed files with 70 additions and 42 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
@@ -1,7 +1,7 @@
Package: austin
Type: Package
Title: Do things with words
Version: 0.2.1
Version: 0.2.2
Date: 2011-03-24
Author: Will Lowe
Maintainer: Will Lowe <conjugateprior@gmail.com>
Expand Down
2 changes: 1 addition & 1 deletion NAMESPACE
@@ -1,4 +1,4 @@
# Generated by roxygen2 (4.1.0): do not edit by hand
# Generated by roxygen2 (4.1.1): do not edit by hand

S3method(coef,classic.wordscores)
S3method(coef,wordfish)
Expand Down
13 changes: 13 additions & 0 deletions NEWS.md
@@ -0,0 +1,13 @@
# austin 0.22

* Made sure `demanif.` datasets to work with indexing behaviour of
recent R versions

# austin 0.21

* first import from r-forge
* revised vignette is now in markdown
* some basic tests



4 changes: 3 additions & 1 deletion README.md
Expand Up @@ -23,4 +23,6 @@ That's it.



"Does she go?" [![Build Status](https://travis-ci.org/conjugateprior/austin.svg?branch=master)](https://travis-ci.org/conjugateprior/austin)
"Does she go?"

[![Build Status](https://travis-ci.org/conjugateprior/austin.svg?branch=master)](https://travis-ci.org/conjugateprior/austin)
Binary file modified data/demanif.econ.RData
Binary file not shown.
Binary file modified data/demanif.soc.RData
Binary file not shown.
2 changes: 1 addition & 1 deletion man/as.docword.Rd
@@ -1,4 +1,4 @@
% Generated by roxygen2 (4.1.0): do not edit by hand
% Generated by roxygen2 (4.1.1): do not edit by hand
% Please edit documentation in R/wfm.R
\name{as.docword}
\alias{as.docword}
Expand Down
2 changes: 1 addition & 1 deletion man/as.wfm.Rd
@@ -1,4 +1,4 @@
% Generated by roxygen2 (4.1.0): do not edit by hand
% Generated by roxygen2 (4.1.1): do not edit by hand
% Please edit documentation in R/wfm.R
\name{as.wfm}
\alias{as.wfm}
Expand Down
2 changes: 1 addition & 1 deletion man/as.worddoc.Rd
@@ -1,4 +1,4 @@
% Generated by roxygen2 (4.1.0): do not edit by hand
% Generated by roxygen2 (4.1.1): do not edit by hand
% Please edit documentation in R/wfm.R
\name{as.worddoc}
\alias{as.worddoc}
Expand Down
2 changes: 1 addition & 1 deletion man/bootstrap.se.Rd
@@ -1,4 +1,4 @@
% Generated by roxygen2 (4.1.0): do not edit by hand
% Generated by roxygen2 (4.1.1): do not edit by hand
% Please edit documentation in R/wordfish.R
\name{bootstrap.se}
\alias{bootstrap.se}
Expand Down
2 changes: 1 addition & 1 deletion man/classic.wordscores.Rd
@@ -1,4 +1,4 @@
% Generated by roxygen2 (4.1.0): do not edit by hand
% Generated by roxygen2 (4.1.1): do not edit by hand
% Please edit documentation in R/classic.wordscores.R
\name{classic.wordscores}
\alias{classic.wordscores}
Expand Down
2 changes: 1 addition & 1 deletion man/coef.classic.wordscores.Rd
@@ -1,4 +1,4 @@
% Generated by roxygen2 (4.1.0): do not edit by hand
% Generated by roxygen2 (4.1.1): do not edit by hand
% Please edit documentation in R/classic.wordscores.R
\name{coef.classic.wordscores}
\alias{coef.classic.wordscores}
Expand Down
2 changes: 1 addition & 1 deletion man/coef.wordfish.Rd
@@ -1,4 +1,4 @@
% Generated by roxygen2 (4.1.0): do not edit by hand
% Generated by roxygen2 (4.1.1): do not edit by hand
% Please edit documentation in R/wordfish.R
\name{coef.wordfish}
\alias{coef.wordfish}
Expand Down
2 changes: 1 addition & 1 deletion man/daildata.Rd
@@ -1,4 +1,4 @@
% Generated by roxygen2 (4.1.0): do not edit by hand
% Generated by roxygen2 (4.1.1): do not edit by hand
% Please edit documentation in R/austin-package.R
\docType{data}
\name{daildata}
Expand Down
2 changes: 1 addition & 1 deletion man/demanif.Rd
@@ -1,4 +1,4 @@
% Generated by roxygen2 (4.1.0): do not edit by hand
% Generated by roxygen2 (4.1.1): do not edit by hand
% Please edit documentation in R/austin-package.R
\docType{data}
\name{demanif}
Expand Down
2 changes: 1 addition & 1 deletion man/demanif.econ.Rd
@@ -1,4 +1,4 @@
% Generated by roxygen2 (4.1.0): do not edit by hand
% Generated by roxygen2 (4.1.1): do not edit by hand
% Please edit documentation in R/austin-package.R
\docType{data}
\name{demanif.econ}
Expand Down
2 changes: 1 addition & 1 deletion man/demanif.foreign.Rd
@@ -1,4 +1,4 @@
% Generated by roxygen2 (4.1.0): do not edit by hand
% Generated by roxygen2 (4.1.1): do not edit by hand
% Please edit documentation in R/austin-package.R
\docType{data}
\name{demanif.foreign}
Expand Down
2 changes: 1 addition & 1 deletion man/demanif.soc.Rd
@@ -1,4 +1,4 @@
% Generated by roxygen2 (4.1.0): do not edit by hand
% Generated by roxygen2 (4.1.1): do not edit by hand
% Please edit documentation in R/austin-package.R
\docType{data}
\name{demanif.soc}
Expand Down
2 changes: 1 addition & 1 deletion man/docs.Rd
@@ -1,4 +1,4 @@
% Generated by roxygen2 (4.1.0): do not edit by hand
% Generated by roxygen2 (4.1.1): do not edit by hand
% Please edit documentation in R/wfm.R
\name{docs}
\alias{docs}
Expand Down
2 changes: 1 addition & 1 deletion man/extractwords.Rd
@@ -1,4 +1,4 @@
% Generated by roxygen2 (4.1.0): do not edit by hand
% Generated by roxygen2 (4.1.1): do not edit by hand
% Please edit documentation in R/extractwords.R
\name{extractwords}
\alias{extractwords}
Expand Down
2 changes: 1 addition & 1 deletion man/fitted.wordfish.Rd
@@ -1,4 +1,4 @@
% Generated by roxygen2 (4.1.0): do not edit by hand
% Generated by roxygen2 (4.1.1): do not edit by hand
% Please edit documentation in R/wordfish.R
\name{fitted.wordfish}
\alias{fitted.wordfish}
Expand Down
2 changes: 1 addition & 1 deletion man/getdocs.Rd
@@ -1,4 +1,4 @@
% Generated by roxygen2 (4.1.0): do not edit by hand
% Generated by roxygen2 (4.1.1): do not edit by hand
% Please edit documentation in R/wfm.R
\name{getdocs}
\alias{getdocs}
Expand Down
2 changes: 1 addition & 1 deletion man/iebudget2009.Rd
@@ -1,4 +1,4 @@
% Generated by roxygen2 (4.1.0): do not edit by hand
% Generated by roxygen2 (4.1.1): do not edit by hand
% Please edit documentation in R/austin-package.R
\docType{data}
\name{iebudget2009}
Expand Down
2 changes: 1 addition & 1 deletion man/initialize.urfish.Rd
@@ -1,4 +1,4 @@
% Generated by roxygen2 (4.1.0): do not edit by hand
% Generated by roxygen2 (4.1.1): do not edit by hand
% Please edit documentation in R/wordfish.R
\name{initialize.urfish}
\alias{initialize.urfish}
Expand Down
2 changes: 1 addition & 1 deletion man/interestgroups.Rd
@@ -1,4 +1,4 @@
% Generated by roxygen2 (4.1.0): do not edit by hand
% Generated by roxygen2 (4.1.1): do not edit by hand
% Please edit documentation in R/austin-package.R
\docType{data}
\name{interestgroups}
Expand Down
2 changes: 1 addition & 1 deletion man/is.wfm.Rd
@@ -1,4 +1,4 @@
% Generated by roxygen2 (4.1.0): do not edit by hand
% Generated by roxygen2 (4.1.1): do not edit by hand
% Please edit documentation in R/wfm.R
\name{is.wfm}
\alias{is.wfm}
Expand Down
2 changes: 1 addition & 1 deletion man/lbg.Rd
@@ -1,4 +1,4 @@
% Generated by roxygen2 (4.1.0): do not edit by hand
% Generated by roxygen2 (4.1.1): do not edit by hand
% Please edit documentation in R/austin-package.R
\docType{data}
\name{lbg}
Expand Down
2 changes: 1 addition & 1 deletion man/plot.classic.wordscores.Rd
@@ -1,4 +1,4 @@
% Generated by roxygen2 (4.1.0): do not edit by hand
% Generated by roxygen2 (4.1.1): do not edit by hand
% Please edit documentation in R/classic.wordscores.R
\name{plot.classic.wordscores}
\alias{plot.classic.wordscores}
Expand Down
2 changes: 1 addition & 1 deletion man/plot.coef.wordfish.Rd
@@ -1,4 +1,4 @@
% Generated by roxygen2 (4.1.0): do not edit by hand
% Generated by roxygen2 (4.1.1): do not edit by hand
% Please edit documentation in R/wordfish.R
\name{plot.coef.wordfish}
\alias{plot.coef.wordfish}
Expand Down
2 changes: 1 addition & 1 deletion man/plot.wordfish.Rd
@@ -1,4 +1,4 @@
% Generated by roxygen2 (4.1.0): do not edit by hand
% Generated by roxygen2 (4.1.1): do not edit by hand
% Please edit documentation in R/wordfish.R
\name{plot.wordfish}
\alias{plot.wordfish}
Expand Down
2 changes: 1 addition & 1 deletion man/predict.classic.wordscores.Rd
@@ -1,4 +1,4 @@
% Generated by roxygen2 (4.1.0): do not edit by hand
% Generated by roxygen2 (4.1.1): do not edit by hand
% Please edit documentation in R/classic.wordscores.R
\name{predict.classic.wordscores}
\alias{predict.classic.wordscores}
Expand Down
2 changes: 1 addition & 1 deletion man/predict.wordfish.Rd
@@ -1,4 +1,4 @@
% Generated by roxygen2 (4.1.0): do not edit by hand
% Generated by roxygen2 (4.1.1): do not edit by hand
% Please edit documentation in R/wordfish.R
\name{predict.wordfish}
\alias{predict.wordfish}
Expand Down
2 changes: 1 addition & 1 deletion man/rescale.Rd
@@ -1,4 +1,4 @@
% Generated by roxygen2 (4.1.0): do not edit by hand
% Generated by roxygen2 (4.1.1): do not edit by hand
% Please edit documentation in R/rescale.R
\name{rescale}
\alias{rescale}
Expand Down
2 changes: 1 addition & 1 deletion man/sim.wordfish.Rd
@@ -1,4 +1,4 @@
% Generated by roxygen2 (4.1.0): do not edit by hand
% Generated by roxygen2 (4.1.1): do not edit by hand
% Please edit documentation in R/wordfish.R
\name{sim.wordfish}
\alias{sim.wordfish}
Expand Down
2 changes: 1 addition & 1 deletion man/summary.classic.wordscores.Rd
@@ -1,4 +1,4 @@
% Generated by roxygen2 (4.1.0): do not edit by hand
% Generated by roxygen2 (4.1.1): do not edit by hand
% Please edit documentation in R/classic.wordscores.R
\name{summary.classic.wordscores}
\alias{summary.classic.wordscores}
Expand Down
2 changes: 1 addition & 1 deletion man/summary.wordfish.Rd
@@ -1,4 +1,4 @@
% Generated by roxygen2 (4.1.0): do not edit by hand
% Generated by roxygen2 (4.1.1): do not edit by hand
% Please edit documentation in R/wordfish.R
\name{summary.wordfish}
\alias{summary.wordfish}
Expand Down
2 changes: 1 addition & 1 deletion man/trim.Rd
@@ -1,4 +1,4 @@
% Generated by roxygen2 (4.1.0): do not edit by hand
% Generated by roxygen2 (4.1.1): do not edit by hand
% Please edit documentation in R/wfm.R
\name{trim}
\alias{trim}
Expand Down
2 changes: 1 addition & 1 deletion man/ukmanif.Rd
@@ -1,4 +1,4 @@
% Generated by roxygen2 (4.1.0): do not edit by hand
% Generated by roxygen2 (4.1.1): do not edit by hand
% Please edit documentation in R/austin-package.R
\docType{data}
\name{ukmanif}
Expand Down
2 changes: 1 addition & 1 deletion man/wfm.Rd
@@ -1,4 +1,4 @@
% Generated by roxygen2 (4.1.0): do not edit by hand
% Generated by roxygen2 (4.1.1): do not edit by hand
% Please edit documentation in R/wfm.R
\name{wfm}
\alias{wfm}
Expand Down
2 changes: 1 addition & 1 deletion man/wfm2bmr.Rd
@@ -1,4 +1,4 @@
% Generated by roxygen2 (4.1.0): do not edit by hand
% Generated by roxygen2 (4.1.1): do not edit by hand
% Please edit documentation in R/wfm.R
\name{wfm2bmr}
\alias{wfm2bmr}
Expand Down
2 changes: 1 addition & 1 deletion man/wfm2lda.Rd
@@ -1,4 +1,4 @@
% Generated by roxygen2 (4.1.0): do not edit by hand
% Generated by roxygen2 (4.1.1): do not edit by hand
% Please edit documentation in R/wfm.R
\name{wfm2lda}
\alias{wfm2lda}
Expand Down
2 changes: 1 addition & 1 deletion man/wordfish.Rd
@@ -1,4 +1,4 @@
% Generated by roxygen2 (4.1.0): do not edit by hand
% Generated by roxygen2 (4.1.1): do not edit by hand
% Please edit documentation in R/wordfish.R
\name{wordfish}
\alias{wordfish}
Expand Down
2 changes: 1 addition & 1 deletion man/wordfreqj.Rd
@@ -1,4 +1,4 @@
% Generated by roxygen2 (4.1.0): do not edit by hand
% Generated by roxygen2 (4.1.1): do not edit by hand
% Please edit documentation in R/wordfreqj.R
\name{wordfreqj}
\alias{wordfreqj}
Expand Down
2 changes: 1 addition & 1 deletion man/wordmargin.Rd
@@ -1,4 +1,4 @@
% Generated by roxygen2 (4.1.0): do not edit by hand
% Generated by roxygen2 (4.1.1): do not edit by hand
% Please edit documentation in R/wfm.R
\name{wordmargin}
\alias{wordmargin}
Expand Down
2 changes: 1 addition & 1 deletion man/words.Rd
@@ -1,4 +1,4 @@
% Generated by roxygen2 (4.1.0): do not edit by hand
% Generated by roxygen2 (4.1.1): do not edit by hand
% Please edit documentation in R/wfm.R
\name{words}
\alias{words}
Expand Down
13 changes: 13 additions & 0 deletions tests/testthat/test_wordfish.R
@@ -0,0 +1,13 @@
library(austin)
context("wordfish")

tol <- 0.00001

test_that("wordfish replicates the generated data", {
set.seed(1234)
dd <- sim.wordfish()
wmod <- wordfish(dd$Y, dir=c(1,10))
expect_is(wmod, 'wordfish')
expect_true(cor(wmod$beta, dd$beta) > 0.99)
expect_true(cor(wmod$theta, dd$theta) > 0.99)
})

0 comments on commit 9a57cc4

Please sign in to comment.