sciruby 0.1.3 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +2 -0
- data/CHANGES +3 -0
- data/CONTRIBUTING.md +46 -0
- data/Gemfile +34 -0
- data/LICENSE.txt +21 -0
- data/README.rdoc +28 -0
- data/lib/sciruby/gems.rb +27 -0
- data/lib/sciruby/version.rb +3 -0
- data/lib/sciruby.rb +2 -77
- data/sciruby.gemspec +35 -0
- metadata +51 -413
- data/.autotest +0 -23
- data/.gemtest +0 -0
- data/History.txt +0 -6
- data/Manifest.txt +0 -119
- data/Rakefile +0 -178
- data/bin/sciruby-plotter +0 -12
- data/data/r/man/AirPassengers.Rd +0 -51
- data/data/r/man/BJsales.Rd +0 -34
- data/data/r/man/BOD.Rd +0 -53
- data/data/r/man/ChickWeight.Rd +0 -68
- data/data/r/man/DNase.Rd +0 -63
- data/data/r/man/EuStockMarkets.Rd +0 -28
- data/data/r/man/Formaldehyde.Rd +0 -44
- data/data/r/man/HairEyeColor.Rd +0 -77
- data/data/r/man/Harman23.cor.Rd +0 -25
- data/data/r/man/Harman74.cor.Rd +0 -28
- data/data/r/man/Indometh.Rd +0 -57
- data/data/r/man/InsectSprays.Rd +0 -45
- data/data/r/man/JohnsonJohnson.Rd +0 -37
- data/data/r/man/LakeHuron.Rd +0 -27
- data/data/r/man/LifeCycleSavings.Rd +0 -54
- data/data/r/man/Loblolly.Rd +0 -56
- data/data/r/man/Nile.Rd +0 -78
- data/data/r/man/Orange.Rd +0 -57
- data/data/r/man/OrchardSprays.Rd +0 -62
- data/data/r/man/PlantGrowth.Rd +0 -39
- data/data/r/man/Puromycin.Rd +0 -84
- data/data/r/man/Theoph.Rd +0 -84
- data/data/r/man/Titanic.Rd +0 -73
- data/data/r/man/ToothGrowth.Rd +0 -40
- data/data/r/man/UCBAdmissions.Rd +0 -68
- data/data/r/man/UKDriverDeaths.Rd +0 -72
- data/data/r/man/UKLungDeaths.Rd +0 -40
- data/data/r/man/UKgas.Rd +0 -25
- data/data/r/man/USAccDeaths.Rd +0 -23
- data/data/r/man/USArrests.Rd +0 -45
- data/data/r/man/USJudgeRatings.Rd +0 -38
- data/data/r/man/USPersonalExpenditure.Rd +0 -33
- data/data/r/man/VADeaths.Rd +0 -51
- data/data/r/man/WWWusage.Rd +0 -41
- data/data/r/man/WorldPhones.Rd +0 -40
- data/data/r/man/ability.cov.Rd +0 -50
- data/data/r/man/airmiles.Rd +0 -29
- data/data/r/man/airquality.Rd +0 -56
- data/data/r/man/anscombe.Rd +0 -62
- data/data/r/man/attenu.Rd +0 -66
- data/data/r/man/attitude.Rd +0 -48
- data/data/r/man/austres.Rd +0 -22
- data/data/r/man/beavers.Rd +0 -73
- data/data/r/man/cars.Rd +0 -59
- data/data/r/man/chickwts.Rd +0 -47
- data/data/r/man/co2.Rd +0 -43
- data/data/r/man/crimtab.Rd +0 -129
- data/data/r/man/datasets-package.Rd +0 -24
- data/data/r/man/discoveries.Rd +0 -30
- data/data/r/man/esoph.Rd +0 -66
- data/data/r/man/euro.Rd +0 -56
- data/data/r/man/eurodist.Rd +0 -25
- data/data/r/man/faithful.Rd +0 -63
- data/data/r/man/freeny.Rd +0 -56
- data/data/r/man/infert.Rd +0 -56
- data/data/r/man/iris.Rd +0 -62
- data/data/r/man/islands.Rd +0 -29
- data/data/r/man/lh.Rd +0 -22
- data/data/r/man/longley.Rd +0 -56
- data/data/r/man/lynx.Rd +0 -33
- data/data/r/man/morley.Rd +0 -50
- data/data/r/man/mtcars.Rd +0 -44
- data/data/r/man/nhtemp.Rd +0 -30
- data/data/r/man/nottem.Rd +0 -30
- data/data/r/man/occupationalStatus.Rd +0 -44
- data/data/r/man/precip.Rd +0 -31
- data/data/r/man/presidents.Rd +0 -36
- data/data/r/man/pressure.Rd +0 -41
- data/data/r/man/quakes.Rd +0 -40
- data/data/r/man/randu.Rd +0 -46
- data/data/r/man/rivers.Rd +0 -21
- data/data/r/man/rock.Rd +0 -34
- data/data/r/man/sleep.Rd +0 -51
- data/data/r/man/stackloss.Rd +0 -77
- data/data/r/man/state.Rd +0 -80
- data/data/r/man/sunspot.month.Rd +0 -49
- data/data/r/man/sunspot.year.Rd +0 -26
- data/data/r/man/sunspots.Rd +0 -33
- data/data/r/man/swiss.Rd +0 -79
- data/data/r/man/treering.Rd +0 -38
- data/data/r/man/trees.Rd +0 -48
- data/data/r/man/uspop.Rd +0 -27
- data/data/r/man/volcano.Rd +0 -31
- data/data/r/man/warpbreaks.Rd +0 -56
- data/data/r/man/women.Rd +0 -40
- data/data/r/man/zCO2.Rd +0 -81
- data/lib/ext/csv.rb +0 -22
- data/lib/ext/shoes.rb +0 -131
- data/lib/ext/string.rb +0 -39
- data/lib/sciruby/analysis/suite.rb +0 -87
- data/lib/sciruby/analysis/suite_report_builder.rb +0 -44
- data/lib/sciruby/analysis.rb +0 -98
- data/lib/sciruby/config.rb +0 -93
- data/lib/sciruby/data/guardian.rb +0 -96
- data/lib/sciruby/data/r/base.rb +0 -110
- data/lib/sciruby/data/r/data_frame.rb +0 -24
- data/lib/sciruby/data/r/grouped_data.rb +0 -7
- data/lib/sciruby/data/r/list.rb +0 -20
- data/lib/sciruby/data/r/multi_time_series.rb +0 -24
- data/lib/sciruby/data/r/r_matrix.rb +0 -7
- data/lib/sciruby/data/r/time_series.rb +0 -19
- data/lib/sciruby/data/r/time_series_base.rb +0 -40
- data/lib/sciruby/data/r/vector.rb +0 -125
- data/lib/sciruby/data/r.rb +0 -155
- data/lib/sciruby/data.rb +0 -168
- data/lib/sciruby/editor.rb +0 -82
- data/lib/sciruby/plotter.rb +0 -128
- data/lib/sciruby/recommend.rb +0 -70
- data/lib/sciruby/validation.rb +0 -368
- data/readme.md +0 -75
- data/static/sciruby-icon.png +0 -0
- data/test/helpers_tests.rb +0 -58
- data/test/test_recommend.rb +0 -16
data/Rakefile
DELETED
@@ -1,178 +0,0 @@
|
|
1
|
-
#!/usr/bin/ruby
|
2
|
-
# -*- ruby -*-
|
3
|
-
# -*- coding: utf-8 -*-
|
4
|
-
$:.unshift(File.dirname(__FILE__)+'/lib/')
|
5
|
-
|
6
|
-
require 'rubygems'
|
7
|
-
require 'rdoc/task'
|
8
|
-
require 'sciruby'
|
9
|
-
require 'hoe'
|
10
|
-
|
11
|
-
# Hoe.plugin :compiler
|
12
|
-
# Hoe.plugin :cucumberfeatures
|
13
|
-
# Hoe.plugin :gem_prelude_sucks
|
14
|
-
Hoe.plugin :git
|
15
|
-
Hoe.plugin :gemspec
|
16
|
-
Hoe.plugin :bundler
|
17
|
-
# Hoe.plugin :inline
|
18
|
-
# Hoe.plugin :manifest
|
19
|
-
# Hoe.plugin :newgem
|
20
|
-
# Hoe.plugin :racc
|
21
|
-
# Hoe.plugin :rubyforge
|
22
|
-
# Hoe.plugin :website
|
23
|
-
|
24
|
-
desc "Ruby Lint"
|
25
|
-
task :lint do
|
26
|
-
executable=Config::CONFIG['RUBY_INSTALL_NAME']
|
27
|
-
Dir.glob("lib/**/*.rb") {|f|
|
28
|
-
if !system %{#{executable} -w -c "#{f}"}
|
29
|
-
puts "Error on: #{f}"
|
30
|
-
end
|
31
|
-
}
|
32
|
-
end
|
33
|
-
|
34
|
-
desc "Open an irb session preloaded with sciruby"
|
35
|
-
task :console do
|
36
|
-
sh "irb -rubygems -I lib -r sciruby.rb"
|
37
|
-
end
|
38
|
-
|
39
|
-
desc "Start the plotter without the console"
|
40
|
-
task :plotter, [:script] => [] do |t,args|
|
41
|
-
if args.script.empty?
|
42
|
-
raise ArgumentError, "Need a script, e.g.: rake plotter[script.rb]"
|
43
|
-
else
|
44
|
-
sh "ruby -rubygems -I lib -r sciruby.rb -e 'SciRuby::Plotter.new(\"#{args.script}\")'"
|
45
|
-
end
|
46
|
-
end
|
47
|
-
|
48
|
-
desc "Start the plotter without the console"
|
49
|
-
task :editor do
|
50
|
-
sh "ruby -rubygems -I lib -r sciruby.rb -e 'SciRuby::Editor.new'"
|
51
|
-
end
|
52
|
-
|
53
|
-
task :release do
|
54
|
-
system %{git push origin master}
|
55
|
-
end
|
56
|
-
|
57
|
-
h = Hoe.spec 'sciruby' do
|
58
|
-
self.version = SciRuby::VERSION
|
59
|
-
self.require_ruby_version ">=1.9"
|
60
|
-
self.developer('SciRuby Development Team', 'sciruby-dev@googlegroups.com')
|
61
|
-
self.extra_deps = {'distribution' => ">=0.4.0",
|
62
|
-
'green_shoes' => ">=1.0.282",
|
63
|
-
'statsample' => ">=1.1.0",
|
64
|
-
'integration' => ">= 0",
|
65
|
-
'minimization' => ">= 0",
|
66
|
-
'gsl' => "~> 1.14.5",
|
67
|
-
'rsvg2' => '~> 1.0.0',
|
68
|
-
'simpler' => '>=0.1.0',
|
69
|
-
'rubyvis' => '>=0.4.0' }.to_a
|
70
|
-
|
71
|
-
|
72
|
-
self.extra_dev_deps = {'hoe' => "~> 2.12",
|
73
|
-
'rdoc' => ">=0",
|
74
|
-
'rspec' => ">=2.0",
|
75
|
-
'haml' => ">=0", # for Rubyvis
|
76
|
-
'coderay' => ">=0", # for Rubyvis
|
77
|
-
'nokogiri' => ">=0", # for Rubyvis
|
78
|
-
'RedCloth' => ">=0", # for Rubyvis
|
79
|
-
'gtksourceview2' => ">=0", # for editor
|
80
|
-
'shoulda' => "~> 2.11",
|
81
|
-
'hoe-gemspec' => "~> 1.0",
|
82
|
-
'hoe-bundler' => "~> 1.1",
|
83
|
-
'minitest' => "~> 2.0" }.to_a
|
84
|
-
|
85
|
-
#self.executables = `git ls-files -- bin/*`.split("\n").map { |f| File.basename(f) }
|
86
|
-
|
87
|
-
self.post_install_message = <<-EOF
|
88
|
-
***********************************************************
|
89
|
-
Welcome to SciRuby: Tools for Scientific Computing in Ruby!
|
90
|
-
|
91
|
-
*** WARNING ***
|
92
|
-
Please be aware that SciRuby is in ALPHA status. If you're
|
93
|
-
thinking of using SciRuby to write mission critical code,
|
94
|
-
such as for driving a car or flying a space shuttle, you
|
95
|
-
may wish to choose other software (for now).
|
96
|
-
|
97
|
-
In order to leverage the GUI features, you will need to
|
98
|
-
install gtk2 and optionally gtksourceview2:
|
99
|
-
|
100
|
-
$ gem install gtk2 gtksourceview2
|
101
|
-
|
102
|
-
You will probably first need to install the headers for
|
103
|
-
a number of required packages. In Ubuntu, use:
|
104
|
-
|
105
|
-
$ sudo apt-get install libgtk2.0-dev libgtksourceview2-dev \\
|
106
|
-
librsvg2-dev libcairo2-dev
|
107
|
-
|
108
|
-
If you have trouble with Green Shoes, you should look at
|
109
|
-
the Green Shoes wiki:
|
110
|
-
|
111
|
-
* http://github.com/ashbb/green_shoes/wiki
|
112
|
-
|
113
|
-
For Mac OSX Green Shoes:
|
114
|
-
|
115
|
-
* https://github.com/ashbb/green_shoes/wiki/Building-Green-Shoes-on-OSX
|
116
|
-
|
117
|
-
More explicit instructions for SciRuby should be available
|
118
|
-
at our website, sciruby.com, or through our mailing list
|
119
|
-
(which can also be found on our website).
|
120
|
-
|
121
|
-
Thanks for installing SciRuby! Happy hypothesis testing!
|
122
|
-
|
123
|
-
***********************************************************
|
124
|
-
EOF
|
125
|
-
|
126
|
-
self.need_rdoc = false
|
127
|
-
|
128
|
-
end
|
129
|
-
|
130
|
-
RDoc::Task.new(:docs) do |rd|
|
131
|
-
rd.main = h.readme_file
|
132
|
-
rd.options << '-d' if (`which dot` =~ /\/dot/) unless
|
133
|
-
ENV['NODOT'] || Hoe::WINDOZE
|
134
|
-
rd.rdoc_dir = 'doc'
|
135
|
-
|
136
|
-
rd.rdoc_files.include("lib/**/*.rb")
|
137
|
-
rd.rdoc_files += h.spec.extra_rdoc_files
|
138
|
-
rd.rdoc_files.reject! {|f| f=="Manifest.txt"}
|
139
|
-
title = h.spec.rdoc_options.grep(/^(-t|--title)=?$/).first
|
140
|
-
if title then
|
141
|
-
rd.options << title
|
142
|
-
|
143
|
-
unless title =~ /\=/ then # for ['-t', 'title here']
|
144
|
-
title_index = spec.rdoc_options.index(title)
|
145
|
-
rd.options << spec.rdoc_options[title_index + 1]
|
146
|
-
end
|
147
|
-
else
|
148
|
-
title = "#{h.name}-#{h.version} Documentation"
|
149
|
-
title = "#{h.rubyforge_name}'s " + title if h.rubyforge_name != h.name
|
150
|
-
rd.options << '--title' << title
|
151
|
-
end
|
152
|
-
end
|
153
|
-
|
154
|
-
desc 'Publish rdocs with analytics support'
|
155
|
-
task :publish_docs => [:clean, :docs] do
|
156
|
-
ruby %{aggregate_adsense_to_doc.rb}
|
157
|
-
path = File.expand_path("~/.rubyforge/user-config.yml")
|
158
|
-
config = YAML.load(File.read(path))
|
159
|
-
host = "#{config["username"]}@rubyforge.org"
|
160
|
-
|
161
|
-
remote_dir = "/var/www/gforge-projects/#{h.rubyforge_name}/#{h.remote_rdoc_dir
|
162
|
-
}"
|
163
|
-
local_dir = h.local_rdoc_dir
|
164
|
-
Dir.glob(local_dir+"/**/*") {|file|
|
165
|
-
sh %{chmod 755 #{file}}
|
166
|
-
}
|
167
|
-
sh %{rsync #{h.rsync_args} #{local_dir}/ #{host}:#{remote_dir}}
|
168
|
-
end
|
169
|
-
|
170
|
-
require 'rspec/core/rake_task'
|
171
|
-
namespace :spec do
|
172
|
-
desc "Run all specs"
|
173
|
-
RSpec::Core::RakeTask.new
|
174
|
-
# options in .rspec in package root
|
175
|
-
end
|
176
|
-
|
177
|
-
|
178
|
-
# vim: syntax=ruby
|
data/bin/sciruby-plotter
DELETED
data/data/r/man/AirPassengers.Rd
DELETED
@@ -1,51 +0,0 @@
|
|
1
|
-
% File src/library/datasets/man/AirPassengers.Rd
|
2
|
-
% Part of the R package, http://www.R-project.org
|
3
|
-
% Copyright 1995-2007 R Core Development Team
|
4
|
-
% Distributed under GPL 2 or later
|
5
|
-
|
6
|
-
\name{AirPassengers}
|
7
|
-
\docType{data}
|
8
|
-
\alias{AirPassengers}
|
9
|
-
\title{Monthly Airline Passenger Numbers 1949-1960}
|
10
|
-
\description{
|
11
|
-
The classic Box & Jenkins airline data. Monthly totals of
|
12
|
-
international airline passengers, 1949 to 1960.
|
13
|
-
}
|
14
|
-
\usage{AirPassengers}
|
15
|
-
\format{
|
16
|
-
A monthly time series, in thousands.
|
17
|
-
}
|
18
|
-
\source{
|
19
|
-
Box, G. E. P., Jenkins, G. M. and Reinsel, G. C. (1976)
|
20
|
-
\emph{Time Series Analysis, Forecasting and Control.}
|
21
|
-
Third Edition. Holden-Day. Series G.
|
22
|
-
}
|
23
|
-
\examples{
|
24
|
-
\dontrun{
|
25
|
-
## These are quite slow and so not run by example(AirPassengers)
|
26
|
-
|
27
|
-
## The classic 'airline model', by full ML
|
28
|
-
(fit <- arima(log10(AirPassengers), c(0, 1, 1),
|
29
|
-
seasonal = list(order=c(0, 1 ,1), period=12)))
|
30
|
-
update(fit, method = "CSS")
|
31
|
-
update(fit, x=window(log10(AirPassengers), start = 1954))
|
32
|
-
pred <- predict(fit, n.ahead = 24)
|
33
|
-
tl <- pred$pred - 1.96 * pred$se
|
34
|
-
tu <- pred$pred + 1.96 * pred$se
|
35
|
-
ts.plot(AirPassengers, 10^tl, 10^tu, log = "y", lty = c(1,2,2))
|
36
|
-
|
37
|
-
## full ML fit is the same if the series is reversed, CSS fit is not
|
38
|
-
ap0 <- rev(log10(AirPassengers))
|
39
|
-
attributes(ap0) <- attributes(AirPassengers)
|
40
|
-
arima(ap0, c(0, 1, 1), seasonal = list(order=c(0, 1 ,1), period=12))
|
41
|
-
arima(ap0, c(0, 1, 1), seasonal = list(order=c(0, 1 ,1), period=12),
|
42
|
-
method = "CSS")
|
43
|
-
|
44
|
-
## Structural Time Series
|
45
|
-
ap <- log10(AirPassengers) - 2
|
46
|
-
(fit <- StructTS(ap, type= "BSM"))
|
47
|
-
par(mfrow=c(1,2))
|
48
|
-
plot(cbind(ap, fitted(fit)), plot.type = "single")
|
49
|
-
plot(cbind(ap, tsSmooth(fit)), plot.type = "single")
|
50
|
-
}}
|
51
|
-
\keyword{datasets}
|
data/data/r/man/BJsales.Rd
DELETED
@@ -1,34 +0,0 @@
|
|
1
|
-
% File src/library/datasets/man/BJsales.Rd
|
2
|
-
% Part of the R package, http://www.R-project.org
|
3
|
-
% Copyright 1995-2007 R Core Development Team
|
4
|
-
% Distributed under GPL 2 or later
|
5
|
-
|
6
|
-
\name{BJsales}
|
7
|
-
\docType{data}
|
8
|
-
\alias{BJsales}
|
9
|
-
\alias{BJsales.lead}
|
10
|
-
\title{Sales Data with Leading Indicator}
|
11
|
-
\description{
|
12
|
-
The sales time series \code{BJsales} and leading indicator
|
13
|
-
\code{BJsales.lead} each contain 150 observations.
|
14
|
-
The objects are of class \code{"ts"}.
|
15
|
-
}
|
16
|
-
\usage{
|
17
|
-
BJsales
|
18
|
-
BJsales.lead
|
19
|
-
}
|
20
|
-
\source{
|
21
|
-
The data are given in Box & Jenkins (1976).
|
22
|
-
Obtained from the Time Series Data Library at
|
23
|
-
\url{http://www-personal.buseco.monash.edu.au/~hyndman/TSDL/}
|
24
|
-
}
|
25
|
-
\references{
|
26
|
-
G. E. P. Box and G. M. Jenkins (1976):
|
27
|
-
\emph{Time Series Analysis, Forecasting and Control},
|
28
|
-
Holden-Day, San Francisco, p. 537.
|
29
|
-
|
30
|
-
P. J. Brockwell and R. A. Davis (1991):
|
31
|
-
\emph{Time Series: Theory and Methods},
|
32
|
-
Second edition, Springer Verlag, NY, pp. 414.
|
33
|
-
}
|
34
|
-
\keyword{datasets}
|
data/data/r/man/BOD.Rd
DELETED
@@ -1,53 +0,0 @@
|
|
1
|
-
% File src/library/datasets/man/BOD.Rd
|
2
|
-
% Part of the R package, http://www.R-project.org
|
3
|
-
% Copyright 1995-2010 R Core Development Team
|
4
|
-
% Distributed under GPL 2 or later
|
5
|
-
|
6
|
-
\name{BOD}
|
7
|
-
\docType{data}
|
8
|
-
\alias{BOD}
|
9
|
-
\title{ Biochemical Oxygen Demand }
|
10
|
-
\description{
|
11
|
-
The \code{BOD} data frame has 6 rows and 2 columns giving the
|
12
|
-
biochemical oxygen demand versus time in an evaluation of water
|
13
|
-
quality.
|
14
|
-
}
|
15
|
-
\usage{BOD}
|
16
|
-
\format{
|
17
|
-
This data frame contains the following columns:
|
18
|
-
\describe{
|
19
|
-
\item{Time}{
|
20
|
-
A numeric vector giving the time of the measurement (days).
|
21
|
-
}
|
22
|
-
\item{demand}{
|
23
|
-
A numeric vector giving the biochemical oxygen demand (mg/l).
|
24
|
-
}
|
25
|
-
}
|
26
|
-
}
|
27
|
-
\source{
|
28
|
-
Bates, D.M. and Watts, D.G. (1988),
|
29
|
-
\emph{Nonlinear Regression Analysis and Its Applications},
|
30
|
-
Wiley, Appendix A1.4.
|
31
|
-
|
32
|
-
Originally from Marske (1967), \emph{Biochemical
|
33
|
-
Oxygen Demand Data Interpretation Using Sum of Squares Surface}
|
34
|
-
M.Sc. Thesis, University of Wisconsin -- Madison.
|
35
|
-
}
|
36
|
-
\examples{
|
37
|
-
\testonly{options(show.nls.convergence=FALSE)
|
38
|
-
old <- options(digits = 5)}
|
39
|
-
require(stats)
|
40
|
-
# simplest form of fitting a first-order model to these data
|
41
|
-
fm1 <- nls(demand ~ A*(1-exp(-exp(lrc)*Time)), data = BOD,
|
42
|
-
start = c(A = 20, lrc = log(.35)))
|
43
|
-
coef(fm1)
|
44
|
-
fm1
|
45
|
-
# using the plinear algorithm
|
46
|
-
fm2 <- nls(demand ~ (1-exp(-exp(lrc)*Time)), data = BOD,
|
47
|
-
start = c(lrc = log(.35)), algorithm = "plinear", trace = TRUE)
|
48
|
-
# using a self-starting model
|
49
|
-
fm3 <- nls(demand ~ SSasympOrig(Time, A, lrc), data = BOD)
|
50
|
-
summary(fm3)
|
51
|
-
\testonly{options(old)}
|
52
|
-
}
|
53
|
-
\keyword{datasets}
|
data/data/r/man/ChickWeight.Rd
DELETED
@@ -1,68 +0,0 @@
|
|
1
|
-
% File src/library/datasets/man/ChickWeight.Rd
|
2
|
-
% Part of the R package, http://www.R-project.org
|
3
|
-
% Copyright 1995-2011 R Core Development Team
|
4
|
-
% Distributed under GPL 2 or later
|
5
|
-
|
6
|
-
\name{ChickWeight}
|
7
|
-
\docType{data}
|
8
|
-
\alias{ChickWeight}
|
9
|
-
\title{Weight versus age of chicks on different diets}
|
10
|
-
\description{
|
11
|
-
The \code{ChickWeight} data frame has 578 rows and 4 columns from an
|
12
|
-
experiment on the effect of diet on early growth of chicks.
|
13
|
-
}
|
14
|
-
\usage{ChickWeight}
|
15
|
-
\format{
|
16
|
-
This object of class \code{c("nfnGroupedData", "nfGroupedData",
|
17
|
-
"groupedData", "data.frame")} containing the following columns:
|
18
|
-
\describe{
|
19
|
-
\item{weight}{
|
20
|
-
a numeric vector giving the body weight of the chick (gm).
|
21
|
-
}
|
22
|
-
\item{Time}{
|
23
|
-
a numeric vector giving the number of days since birth when
|
24
|
-
the measurement was made.
|
25
|
-
}
|
26
|
-
\item{Chick}{
|
27
|
-
an ordered factor with levels
|
28
|
-
\code{18} < \dots < \code{48}
|
29
|
-
giving a unique identifier for the chick. The ordering of
|
30
|
-
the levels groups chicks on the same diet together and
|
31
|
-
orders them according to their final weight (lightest to
|
32
|
-
heaviest) within diet.
|
33
|
-
}
|
34
|
-
\item{Diet}{
|
35
|
-
a factor with levels 1,\dots,4 indicating which
|
36
|
-
experimental diet the chick received.
|
37
|
-
}
|
38
|
-
}
|
39
|
-
}
|
40
|
-
\details{
|
41
|
-
The body weights of the chicks were measured at birth and every
|
42
|
-
second day thereafter until day 20. They were also measured on day
|
43
|
-
21. There were four groups on chicks on different protein diets.
|
44
|
-
|
45
|
-
This dataset was originally part of package \code{nlme}, and that has
|
46
|
-
methods (including for \code{[}, \code{as.data.frame}, \code{plot} and
|
47
|
-
\code{print}) for its grouped-data classes.
|
48
|
-
}
|
49
|
-
\source{
|
50
|
-
Crowder, M. and Hand, D. (1990), \emph{Analysis of Repeated Measures},
|
51
|
-
Chapman and Hall (example 5.3)
|
52
|
-
|
53
|
-
Hand, D. and Crowder, M. (1996), \emph{Practical Longitudinal Data
|
54
|
-
Analysis}, Chapman and Hall (table A.2)
|
55
|
-
|
56
|
-
Pinheiro, J. C. and Bates, D. M. (2000) \emph{Mixed-effects Models in
|
57
|
-
S and S-PLUS}, Springer.
|
58
|
-
}
|
59
|
-
\seealso{
|
60
|
-
\code{\link{SSlogis}} for models fitted to this dataset.
|
61
|
-
}
|
62
|
-
|
63
|
-
\examples{\donttest{
|
64
|
-
require(graphics)
|
65
|
-
coplot(weight ~ Time | Chick, data = ChickWeight,
|
66
|
-
type = "b", show.given = FALSE)
|
67
|
-
}}
|
68
|
-
\keyword{datasets}
|
data/data/r/man/DNase.Rd
DELETED
@@ -1,63 +0,0 @@
|
|
1
|
-
% File src/library/datasets/man/DNase.Rd
|
2
|
-
% Part of the R package, http://www.R-project.org
|
3
|
-
% Copyright 1995-2011 R Core Development Team
|
4
|
-
% Distributed under GPL 2 or later
|
5
|
-
|
6
|
-
\name{DNase}
|
7
|
-
\docType{data}
|
8
|
-
\alias{DNase}
|
9
|
-
\title{Elisa assay of DNase}
|
10
|
-
\description{
|
11
|
-
The \code{DNase} data frame has 176 rows and 3 columns of data
|
12
|
-
obtained during development of an ELISA assay for the recombinant
|
13
|
-
protein DNase in rat serum.
|
14
|
-
}
|
15
|
-
\usage{DNase}
|
16
|
-
\format{
|
17
|
-
This object of class \code{c("nfnGroupedData", "nfGroupedData",
|
18
|
-
"groupedData", "data.frame")} containing the following columns:
|
19
|
-
\describe{
|
20
|
-
\item{Run}{
|
21
|
-
an ordered factor with levels \code{10} < \dots < \code{3}
|
22
|
-
indicating the assay run.
|
23
|
-
}
|
24
|
-
\item{conc}{
|
25
|
-
a numeric vector giving the known concentration of the
|
26
|
-
protein.
|
27
|
-
}
|
28
|
-
\item{density}{
|
29
|
-
a numeric vector giving the measured optical density
|
30
|
-
(dimensionless) in the assay. Duplicate optical density
|
31
|
-
measurements were obtained.
|
32
|
-
}
|
33
|
-
}
|
34
|
-
}
|
35
|
-
\details{
|
36
|
-
This dataset was originally part of package \code{nlme}, and that has
|
37
|
-
methods (including for \code{[}, \code{as.data.frame}, \code{plot} and
|
38
|
-
\code{print}) for its grouped-data classes.
|
39
|
-
}
|
40
|
-
\source{
|
41
|
-
Davidian, M. and Giltinan, D. M. (1995) \emph{Nonlinear Models for
|
42
|
-
Repeated Measurement Data}, Chapman & Hall (section 5.2.4, p. 134)
|
43
|
-
|
44
|
-
Pinheiro, J. C. and Bates, D. M. (2000) \emph{Mixed-effects Models in
|
45
|
-
S and S-PLUS}, Springer.
|
46
|
-
}
|
47
|
-
\examples{
|
48
|
-
require(stats); require(graphics)
|
49
|
-
\testonly{options(show.nls.convergence=FALSE)}
|
50
|
-
coplot(density ~ conc | Run, data = DNase,
|
51
|
-
show.given = FALSE, type = "b")
|
52
|
-
coplot(density ~ log(conc) | Run, data = DNase,
|
53
|
-
show.given = FALSE, type = "b")
|
54
|
-
## fit a representative run
|
55
|
-
fm1 <- nls(density ~ SSlogis( log(conc), Asym, xmid, scal ),
|
56
|
-
data = DNase, subset = Run == 1)
|
57
|
-
## compare with a four-parameter logistic
|
58
|
-
fm2 <- nls(density ~ SSfpl( log(conc), A, B, xmid, scal ),
|
59
|
-
data = DNase, subset = Run == 1)
|
60
|
-
summary(fm2)
|
61
|
-
anova(fm1, fm2)
|
62
|
-
}
|
63
|
-
\keyword{datasets}
|
@@ -1,28 +0,0 @@
|
|
1
|
-
% File src/library/datasets/man/EuStockMarkets.Rd
|
2
|
-
% Part of the R package, http://www.R-project.org
|
3
|
-
% Copyright 1995-2007 R Core Development Team
|
4
|
-
% Distributed under GPL 2 or later
|
5
|
-
|
6
|
-
\name{EuStockMarkets}
|
7
|
-
\docType{data}
|
8
|
-
\alias{EuStockMarkets}
|
9
|
-
\title{
|
10
|
-
Daily Closing Prices of Major European Stock Indices, 1991--1998
|
11
|
-
}
|
12
|
-
\description{
|
13
|
-
Contains the daily closing prices of major European stock indices:
|
14
|
-
Germany DAX (Ibis), Switzerland SMI, France CAC, and UK FTSE. The
|
15
|
-
data are sampled in business time, i.e., weekends and holidays are
|
16
|
-
omitted.
|
17
|
-
}
|
18
|
-
\usage{
|
19
|
-
EuStockMarkets
|
20
|
-
}
|
21
|
-
\format{
|
22
|
-
A multivariate time series with 1860 observations on 4 variables.
|
23
|
-
The object is of class \code{"mts"}.
|
24
|
-
}
|
25
|
-
\source{
|
26
|
-
The data were kindly provided by Erste Bank AG, Vienna, Austria.
|
27
|
-
}
|
28
|
-
\keyword{datasets}
|
data/data/r/man/Formaldehyde.Rd
DELETED
@@ -1,44 +0,0 @@
|
|
1
|
-
% File src/library/datasets/man/Formaldehyde.Rd
|
2
|
-
% Part of the R package, http://www.R-project.org
|
3
|
-
% Copyright 1995-2009 R Core Development Team
|
4
|
-
% Distributed under GPL 2 or later
|
5
|
-
|
6
|
-
\name{Formaldehyde}
|
7
|
-
\docType{data}
|
8
|
-
\alias{Formaldehyde}
|
9
|
-
\title{Determination of Formaldehyde}
|
10
|
-
\description{
|
11
|
-
These data are from a chemical experiment to prepare a standard curve
|
12
|
-
for the determination of formaldehyde by the addition of chromatropic
|
13
|
-
acid and concentrated sulphuric acid and the reading of the resulting
|
14
|
-
purple color on a spectrophotometer.
|
15
|
-
}
|
16
|
-
\usage{Formaldehyde}
|
17
|
-
\format{
|
18
|
-
A data frame with 6 observations on 2 variables.
|
19
|
-
\tabular{rlll}{
|
20
|
-
[,1] \tab carb\tab numeric \tab Carbohydrate (ml) \cr
|
21
|
-
[,2] \tab optden \tab numeric \tab Optical Density
|
22
|
-
}
|
23
|
-
}
|
24
|
-
\source{
|
25
|
-
Bennett, N. A. and N. L. Franklin (1954)
|
26
|
-
\emph{Statistical Analysis in Chemistry and the Chemical Industry}.
|
27
|
-
New York: Wiley.
|
28
|
-
}
|
29
|
-
\references{
|
30
|
-
McNeil, D. R. (1977) \emph{Interactive Data Analysis.}
|
31
|
-
New York: Wiley.
|
32
|
-
}
|
33
|
-
\examples{
|
34
|
-
require(stats); require(graphics)
|
35
|
-
plot(optden ~ carb, data = Formaldehyde,
|
36
|
-
xlab = "Carbohydrate (ml)", ylab = "Optical Density",
|
37
|
-
main = "Formaldehyde data", col = 4, las = 1)
|
38
|
-
abline(fm1 <- lm(optden ~ carb, data = Formaldehyde))
|
39
|
-
summary(fm1)
|
40
|
-
opar <- par(mfrow = c(2,2), oma = c(0, 0, 1.1, 0))
|
41
|
-
plot(fm1)
|
42
|
-
par(opar)
|
43
|
-
}
|
44
|
-
\keyword{datasets}
|
data/data/r/man/HairEyeColor.Rd
DELETED
@@ -1,77 +0,0 @@
|
|
1
|
-
% File src/library/datasets/man/HairEyeColor.Rd
|
2
|
-
% Part of the R package, http://www.R-project.org
|
3
|
-
% Copyright 1995-2007 R Core Development Team
|
4
|
-
% Distributed under GPL 2 or later
|
5
|
-
|
6
|
-
\name{HairEyeColor}
|
7
|
-
\docType{data}
|
8
|
-
\alias{HairEyeColor}
|
9
|
-
\title{Hair and Eye Color of Statistics Students}
|
10
|
-
\description{
|
11
|
-
Distribution of hair and eye color and sex in 592 statistics students.
|
12
|
-
}
|
13
|
-
\usage{HairEyeColor}
|
14
|
-
\format{
|
15
|
-
A 3-dimensional array resulting from cross-tabulating 592 observations
|
16
|
-
on 3 variables. The variables and their levels are as follows:
|
17
|
-
|
18
|
-
\tabular{rll}{
|
19
|
-
No \tab Name \tab Levels \cr
|
20
|
-
1 \tab Hair \tab Black, Brown, Red, Blond \cr
|
21
|
-
2 \tab Eye \tab Brown, Blue, Hazel, Green \cr
|
22
|
-
3 \tab Sex \tab Male, Female
|
23
|
-
}
|
24
|
-
}
|
25
|
-
\details{
|
26
|
-
The Hair \eqn{\times}{x} Eye table comes rom a survey of students at
|
27
|
-
the University of Delaware reported by Snee (1974). The split by
|
28
|
-
\code{Sex} was added by Friendly (1992a) for didactic purposes.
|
29
|
-
|
30
|
-
This data set is useful for illustrating various techniques for the
|
31
|
-
analysis of contingency tables, such as the standard chi-squared test
|
32
|
-
or, more generally, log-linear modelling, and graphical methods such
|
33
|
-
as mosaic plots, sieve diagrams or association plots.
|
34
|
-
}
|
35
|
-
\source{
|
36
|
-
\url{http://euclid.psych.yorku.ca/ftp/sas/vcd/catdata/haireye.sas}
|
37
|
-
|
38
|
-
Snee (1974) gives the two-way table aggregated over \code{Sex}. The
|
39
|
-
Sex split of the \sQuote{Brown hair, Brown eye} cell was changed in
|
40
|
-
\R 2.6.0 to agree with that used by Friendly (2000).
|
41
|
-
}
|
42
|
-
\references{
|
43
|
-
Snee, R. D. (1974)
|
44
|
-
Graphical display of two-way contingency tables.
|
45
|
-
\emph{The American Statistician}, \bold{28}, 9--12.
|
46
|
-
|
47
|
-
Friendly, M. (1992a)
|
48
|
-
Graphical methods for categorical data.
|
49
|
-
\emph{SAS User Group International Conference Proceedings}, \bold{17},
|
50
|
-
190--200.
|
51
|
-
\url{http://www.math.yorku.ca/SCS/sugi/sugi17-paper.html}
|
52
|
-
|
53
|
-
Friendly, M. (1992b)
|
54
|
-
Mosaic displays for loglinear models.
|
55
|
-
\emph{Proceedings of the Statistical Graphics Section},
|
56
|
-
American Statistical Association, pp. 61--68.
|
57
|
-
\url{http://www.math.yorku.ca/SCS/Papers/asa92.html}
|
58
|
-
|
59
|
-
Friendly, M. (2000)
|
60
|
-
\emph{Visualizing Categorical Data.}
|
61
|
-
SAS Institute, ISBN 1-58025-660-0.
|
62
|
-
}
|
63
|
-
\seealso{
|
64
|
-
\code{\link{chisq.test}},
|
65
|
-
\code{\link{loglin}},
|
66
|
-
\code{\link{mosaicplot}}
|
67
|
-
}
|
68
|
-
\examples{
|
69
|
-
require(graphics)
|
70
|
-
## Full mosaic
|
71
|
-
mosaicplot(HairEyeColor)
|
72
|
-
## Aggregate over sex (as in Snee's original data)
|
73
|
-
x <- apply(HairEyeColor, c(1, 2), sum)
|
74
|
-
x
|
75
|
-
mosaicplot(x, main = "Relation between hair and eye color")
|
76
|
-
}
|
77
|
-
\keyword{datasets}
|
data/data/r/man/Harman23.cor.Rd
DELETED
@@ -1,25 +0,0 @@
|
|
1
|
-
% File src/library/datasets/man/Harman23.cor.Rd
|
2
|
-
% Part of the R package, http://www.R-project.org
|
3
|
-
% Copyright 1995-2007 R Core Development Team
|
4
|
-
% Distributed under GPL 2 or later
|
5
|
-
|
6
|
-
\name{Harman23.cor}
|
7
|
-
\docType{data}
|
8
|
-
\alias{Harman23.cor}
|
9
|
-
\title{Harman Example 2.3}
|
10
|
-
\description{
|
11
|
-
A correlation matrix of eight physical measurements on 305 girls between
|
12
|
-
ages seven and seventeen.
|
13
|
-
}
|
14
|
-
\usage{Harman23.cor}
|
15
|
-
\source{
|
16
|
-
Harman, H. H. (1976)
|
17
|
-
\emph{Modern Factor Analysis}, Third Edition Revised,
|
18
|
-
University of Chicago Press, Table 2.3.
|
19
|
-
}
|
20
|
-
\examples{
|
21
|
-
require(stats)
|
22
|
-
(Harman23.FA <- factanal(factors = 1, covmat = Harman23.cor))
|
23
|
-
for(factors in 2:4) print(update(Harman23.FA, factors = factors))
|
24
|
-
}
|
25
|
-
\keyword{datasets}
|
data/data/r/man/Harman74.cor.Rd
DELETED
@@ -1,28 +0,0 @@
|
|
1
|
-
% File src/library/datasets/man/Harman74.cor.Rd
|
2
|
-
% Part of the R package, http://www.R-project.org
|
3
|
-
% Copyright 1995-2007 R Core Development Team
|
4
|
-
% Distributed under GPL 2 or later
|
5
|
-
|
6
|
-
\name{Harman74.cor}
|
7
|
-
\docType{data}
|
8
|
-
\alias{Harman74.cor}
|
9
|
-
\title{Harman Example 7.4}
|
10
|
-
\description{
|
11
|
-
A correlation matrix of 24 psychological tests given to 145 seventh and
|
12
|
-
eight-grade children in a Chicago suburb by Holzinger and Swineford.
|
13
|
-
}
|
14
|
-
\usage{Harman74.cor}
|
15
|
-
\source{
|
16
|
-
Harman, H. H. (1976)
|
17
|
-
\emph{Modern Factor Analysis}, Third Edition Revised,
|
18
|
-
University of Chicago Press, Table 7.4.
|
19
|
-
}
|
20
|
-
\examples{
|
21
|
-
require(stats)
|
22
|
-
(Harman74.FA <- factanal(factors = 1, covmat = Harman74.cor))
|
23
|
-
for(factors in 2:5) print(update(Harman74.FA, factors = factors))
|
24
|
-
Harman74.FA <- factanal(factors = 5, covmat = Harman74.cor,
|
25
|
-
rotation="promax")
|
26
|
-
print(Harman74.FA$loadings, sort = TRUE)
|
27
|
-
}
|
28
|
-
\keyword{datasets}
|