Try this. Anything that appears only in Smaller is candidate for smallest.
Among those, order is arbitrary.
Anything that appears only in Larger is a candidate for largest. Among
those order is arbitrary.
Remove rows of matComp containing the already classified items. Repeat
with the smaller set
>From ?Arithmetic
the elements of shorter
vectors are recycled as necessary (with a ‘warning’ when they are
recycled only _fractionally_).
> tmp <- !is.na(y[1:3])
> tmp
[1] TRUE TRUE FALSE
> c(tmp, tmp)
[1] TRUE TRUE FALSE TRUE TRUE FALSE
> c(tmp, tmp)[1:4]
[1] TRUE TRUE FALSE T
To me the interesting difference between matrix() and as.matrix() is
that as.matrix() retains the argument names as the rows names of the
result.
> tmp <- structure(1:3, names=letters[1:3])
> tmp
a b c
1 2 3
> matrix(tmp)
[,1]
[1,]1
[2,]2
[3,]3
> as.matrix(tmp)
[,1]
a1
b2
and the mmcplot in the HH package which plots the results from the
multcomp package.
On Thu, Jan 24, 2019 at 11:14 PM Rolf Turner wrote:
>
>
> On 1/25/19 4:51 PM, reichm...@sbcglobal.net wrote:
>
> > R-Help
> >
> >
> >
> > There is an R library that will perform a Tukey test ...
>
>
>
> Surely y
this might work for you
newy <- sign(oldy)*f(abs(oldy))
where f() is a monotonic transformation, perhaps a power function.
On Sun, Jan 20, 2019 at 11:08 AM Adrian Johnson
wrote:
>
> I apologize, I forgot to mention another key operation.
> in my matrix -1 to <0 has a different meaning while va
ed=="False") (this participant 875)
>
> screenon_true=subset(p1,valuedetailed=="True") (this participant 916)
>
>
>
> and for activity probe to none, low and high to find the required values
>
>
>
> activity_none=subset(p1,valuedetailed=="none&q
## Here is an example using the 3-way interaction plot from the HH package
install.packages("HH") ## if necessary
## The HH package supports the book
## Statistical Analysis and Data Display
## Richard M. Heiberger and Burt Holland
## http://www.springer.com/us/book/9781493921218
Questions like this
1. I want to have a summary of how many times a specific subject got called
(CallLogProbe)
suggest that you should look at the table function. See
?table
and run the examples.
They show how to get one-way frequency tables and two-way contingency
tables.
If you have followup q
I downloaded the Donors dataset
https://dcc.icgc.org/search?filters=%7B%22donor%22:%7B%22projectId%22:%7B%22is%22:%5B%22GBM-US%22%5D%7D,%22availableDataTypes%22:%7B%22is%22:%5B%22pexp%22%5D%7D%7D%7D
by clicking "Export table as TSV".
Then I read it with
donors <- read.delim("~/Downloads/donors_
gt; > >> >>
> > >> >> I worked on directly downloading the file into R as was suggested,
> > >> >but
> > >> >> have thus far been unsuccessful. This is what I generated on my
> > >> >second
> > >>
I looked at the first file. It gives an option to download as TSV
(tab separated values).
That is the same as CSV except with tabs instead of commas.
You do not need any external software to read it. Read the downloaded
file directly into R.
read.delim looks as if it would work directly on the d
## This example, with your variable names, works correctly.
z2 <- data.frame(y=1:5, x=c(1,5,2,3,5), x2=c(1,5,2,3,5)^2)
z2
class(z2)
length(z2)
dim(z2)
lm(y ~ x + x2, data=z2)
## note that that variable names y, x, x2 are column names of the
## data.frame z2
## please review the definitions and
304 1538.012 1617.985 1865.149 2177.071 100 b
rmh4 850.729 1042.997 1380.842 1416.476 1700.307 2448.545 100 a
On Mon, Dec 17, 2018 at 12:49 PM Richard M. Heiberger wrote:
>
> this can be dome even faster, and I think more easily read, using only base R
>
> d1 <- data.frame(
this can be dome even faster, and I think more easily read, using only base R
d1 <- data.frame(workshop=rep(1:2,4),
gender=rep(c("f","m"),each=4))
## needed by vector and rowbased, not needed by rmh
library(tibble)
library(plyr)
library(magrittr)
microbenchmark(
vector = {d1 %>
interesting. this looks like an OS problem, since ?round says
‘round’ rounds the values in its first argument to the specified
number of decimal places (default 0). See ‘Details’ about “round
to even” when rounding off a 5.
Details
Note that for rounding off a 5, the IEC 60559
; B[upper.tri(B, diag=FALSE)] <- A[upper.tri(A)]
> B
[,1] [,2] [,3]
[1,]247
[2,]368
>
On Wed, Nov 14, 2018 at 2:09 PM Richard M. Heiberger wrote:
>
> Steve's method is very slick.
>
> I think this is a bit easier to understand.
>
> A <- mat
Steve's method is very slick.
I think this is a bit easier to understand.
A <- matrix(1:9, 3, 3)
A
B <- matrix(nrow=2, ncol=3)
B[lower.tri(B, diag=TRUE)] <- A[lower.tri(A)]
B[upper.tri(B, diag=FALSE)] <- A[upper.tri(A)]
B
> A <- matrix(1:9, 3, 3)
> A
[,1] [,2] [,3]
[1,]147
[2,]
e situatie in zeer hoge mate van toepassing is voor u of uw
>>> >>>> > supervisorengroep LIKERT STRING
>>> >>>> > 3 de situatie in zeer hoge mate van toepassing is voor u of uw
>>> >>>> > supervisorengroep LIKERT STRING
>>
ngroep",
> "de situatie in zeer hoge mate van toepassing is voor u of uw
> supervisorengroep",
> "de situatie in zeer hoge mate van toepassing is voor u of uw
> supervisorengroep",
> "de situatie in zeer hoge mate van toepassing is voor u of uw
> supervisoreng
7 schreef Richard M. Heiberger :
>>
>> Please send me the
>> dput(teamq)
>>
>>
>> On Wed, Oct 31, 2018 at 03:51 P. Roberto Bakker
>> wrote:
>>>
>>> Thank you for you information. Package 'HH' is interesting.
>>&
ble names would be a
> problem.
> Same error.
>
> What could I do?
>
> Best and thank you in advance.
> Roberto
>
>
> Op ma 22 okt. 2018 om 20:10 schreef Richard M. Heiberger :
>
>> Try the likert function in
>> install.packages("HH) ## if necessar
Try the likert function in
install.packages("HH) ## if necessary
library(HH)
Then using David Carlson's example teamq
likert(teamq)
Your example in the 1:30PM (Eastern Daylight Time) doesn't work.
Error in revalue(teamq, c(`de situatie in zeer geringe mate van
toepassing is\nvoor u of uw supervis
FAQ 7.31
Open this file in your favorite text editor on your computer
system.file("../../doc/FAQ")
57.5 comes out even in binary, and .575 does not.
> print(.575*100, digits=17)
[1] 57.493
## The fraction is less than .5, hence it gets rounded down to 57
> print(57.5, digits=17)
[1] 5
install.packages("HH")
library(HH)
system.file("demo/bwplot.examples.r", package="HH")
demo("bwplot.examples", package="HH", ask=FALSE)
## your example
dfA <- data.frame(X, Y=c(A, B, C))
dfA$X.factor <- factor(dfA$X)
position(dfA$X.factor) <- c(1,3,5)
bwplot(Y ~ X.factor, panel=panel.bwplot.interm
c1 <- 1:100
len <- 100
system.time(
s1 <- log(c1[-1]/c1[-len])
)
s <- c1[-len]
system.time(
for (i in 1:(len-1)) s[i] <- log(c1[i+1]/c1[i])
)
all.equal(s,s1)
>
> c1 <- 1:100
> len <- 100
> system.time(
+ s1 <- log(c1[-1]/c1[-len])
+ )
user system elapsed
0.032 0.005 0.03
color for the legend comes from trellis.par.get
You can control that for an individual plot with the par.settings argument.
tmp <- data.frame(y=sample(10),
group=rep(c("Median", "Maximum"), each=5),
year=factor(rep(1998:1999, length=10)))
barchart(y ~ year, da
## I would use microplot in this situation.
## This example produces a pdf file containing the graph.
library(lattice)
library(microplot)
## Hmisc options for pdflatex
## graphics files are .pdf
latexSetOptions()
RtoLatex <- function(subset , subset.char=substitute(subset)) {
## you might need
## Don,
## This is how I would approach the task of a set of coordinated plots.
## I would place individual plots inside a table. The rows would index the
## datasets and there would be one or more data or description columns
## in addition to the column containing the graphs.
## I use the micro
There is no explanation other than gremlins and the malevolence that
the computer gods hold towards me.
fortune nomination.
On Tue, Aug 14, 2018 at 7:12 PM, Rolf Turner wrote:
> On 14/08/18 23:01, peter dalgaard wrote:
>>
>> Hmm,
>>
>>> .Fortran(stats:::C_setsmu, as.integer(0))
>>
>> [[1]]
>> [1
You are getting the correct version. R is using the 8.3 version of the path.
MS DOS often can't handle long MS Windows pathnames, particularly with
blank space characters.
MS therefore provides an 8.3 equivalent for all long names.
C:\>dir /x prog*
dir /x prog*
Volume in drive C has no label.
V
## I recommend using lattice for this task.
## First I show the example from my book and package (HH).
## Then I use this on your example.
library(HH) ## Package supporting Heiberger and Holland,
## Statistical Analysis and Data Display (Second
edition, 2015)
HHscriptnames(
This is a variant of FAQ 7.31 on rounding.
For hand arithmetic, for example the variance of c(29,30,31), it was
easier to subtract the mean and work with c(-1,0,1).
For limited precision computers working directly with many-digit
numbers could lead to rounding in intermediate steps and catastrophi
See if the microplot package provides what you need.
The package help file and the vignette will get you started.
Microplot works with Hmisc::latex or with MS Word into either Word or HTML.
On Wed, Jun 27, 2018 at 19:04 Stats Student
wrote:
> Thanks, Jeff. The Task View page was very informative
matrix("", (n + nc - 1) %/% nc, nc)
>
> for generalizability, as I may have to increase nc as the list of words
> grows ever longer.
>
> Thanks everyone. Several good suggestions.
>
> --Chris Ryan
>
> Richard M. Heiberger wr
I think this is cuter, and it is a hair faster.
n <- length(dd)
ddm <- matrix("", (n+2) %/% nc, nc)
ddm[1:n] <- dd
Rich
> system.time(for (i in 1:1) {
+ add <- nc - (length(dd) %% nc)
+ dd2 <- c(dd, rep("", add))
+ ddm <- matrix(dd2, ncol = nc)
+ })
user system elapsed
0.064 0.100
I recommend instead of no border, that you use a border with the same
color as the fill.
I do this in the likert functions in the HH package.
Rich
On Mon, May 21, 2018 at 10:59 AM, Martin Batholdy via R-help
wrote:
> Dear R-users,
>
> I want to draw a barplot with beside=TRUE.
> One halve of th
You can tell Macintosh not to automatically unpack tar.gz files.
https://apple.stackexchange.com/questions/961/how-to-stop-safari-from-unzipping-files-after-download
On Wed, May 16, 2018 at 11:24 AM, Evguenia Ignatova
wrote:
> Hello,
>
> I am having difficulty installing the most recent compati
The stored numbers are correct. They are rounded on printing.
print(RevFCast, digits=17)
See
?options
And scroll down to digits.
On Mon, May 7, 2018 at 11:50 Bill Poling wrote:
> Hi, Novice UsR here.
>
> I have a csv file that contains 13 columns of numeric data that have
> decimal places (for
Please look at my book
Statistical Analysis and Data Display
https://www.springer.com/us/book/9781493921218
Figures 3.8, 3.9, 3.10
The code for these figures is available in the HH package
install.packages("HH")
library(HH)
HHscriptnames(3) ## this gives the filename on your computer containing
rowMeans is designed for speed. It also has as.matrix inside it.
On Tue, Mar 20, 2018 at 10:40 PM, Boris Steipe wrote:
> R > rowMeans(roop)
> [1] 1.67 5.33 3.00
> R > mean(as.numeric(roop[1,]))
> [1] 1.67
>
>
> :-)
>
>
>
>
>> On Mar 20, 2018, at 10:18 PM, Sorkin, John wrote:
>>
> mean(list(1,4,0))
[1] NA
Warning message:
In mean.default(list(1, 4, 0)) :
argument is not numeric or logical: returning NA
> mean(unlist(roop[1,]))
[1] 1.67
> apply(roop, 1, mean)
[1] 1.67 5.33 3.00
data.frame is a list with some matrix characteristics.
The list characteristic
It looks like your V3 is a factor.
testing_ggplot <- data.frame(
V1=factor(c(256, 256, 256, 272, 272, 272)),
V2=c("Disabled", "Disabled", "Enabled", "Disabled", "Enabled", "Enabled"),
V3=681:686)
library(ggplot2)
ggplot(testing_ggplot, aes(V2,V3 )) + geom_boxplot() +
facet_wrap( ~ V
Please look at the microplot package,
install.packages("microplot") ## it will bring in lots of other packages.
Specifically look at the demo
demo("tablesPlusGraphicColumn", package="microplot")
The last item in that demo is an MS Word table with the text of the
question, some numerical informa
Petr, there was a thinko in your response.
tmp <- data.frame(m=factor(letters[1:4]), n=1:4)
tmp
tmp$m <- factor(tmp$m, levels=c("c","b","a","d")) ## right
tmp[order(tmp$m),]
tmp <- data.frame(m=factor(letters[1:4]), n=1:4)
levels(tmp$m) <- c("c","b","a","d") ## wrong
tmp[order(tmp$m),]
changing
FAQ 7.22
You must print a ggplot object, for example with
print(m52.2cluster)
For the FAQ, run the line
system.file("../../doc/FAQ")
in R on your computer.
Open up the resulting filepath in your favorite editor and scroll down to 7.22
On Sun, Jan 14, 2018 at 4:21 PM, Ding, Yuan Chun wrote:
>
> version
_
platform x86_64-w64-mingw32
arch x86_64
os mingw32
system x86_64, mingw32
status Patched
major 3
minor 4.3
year 2017
month 12
day12
svn rev73903
language R
version.s
> library(latticeExtra)
Loading required package: lattice
Loading required package: RColorBrewer
> t11 <- xyplot(1 ~ 1)
> t11
> c(t11, t11)
Warning message:
In formals(fun) : argument is not a function
> version
_
platform x86_64-w64-mingw32
arch x86_64
os
installr is Windows-specific. From the DESCRIPTION
OS_type:windows
I would guess that some of it would work on other OS, but you would
have to check.
If it looks useful elsewhere you should tell Tal
Maintainer:Tal Galili
Rich
On Fri, Nov 10, 2017 at 1:18 PM, J C Nash wrote:
> However, trying
Try the installr package. It was designed for this purpose.
On Fri, Nov 10, 2017 at 11:49 AM, Bond, Stephen wrote:
> Is there a utility which will allow me to upgrade my R version and update all
> packages from the old version?
> If I manually upgrade, then I have to manually re-install 50 packa
Assuming you have as your model a one-way ANOVA, you can use the
aovSufficient function in HH.
## install.packages("HH") ## if you don't have it yet
library(HH)
?aovSufficient
On Sat, Nov 4, 2017 at 9:30 AM, Paul Kent wrote:
> Hi,
>
>
> I've been performing some TukeyHSD tests in R and have come
FAQ 7.22
Open the file indicated by
system.file("../../doc/FAQ")
and scroll down to 7.22
On Thu, Nov 2, 2017 at 1:03 PM, Ed Siefker wrote:
> I don't really understand. I mean, I understand the solution is
> print(ggplot(...)). But why is that required in a function and not at
> the console?
>
integer is a subclass of numeric.
> is.numeric(data.matrix(test.df)[[1]])
[1] TRUE
See ?integer, ?numeric, ?storage.mode
On Fri, Oct 13, 2017 at 2:07 PM, Ed Siefker wrote:
> I have a data frame full of integer values. I need a matrix full of
> numeric values.
>
> ?data.matrix reads:
>
>
And also to the initial error message
I suggest the message be revised to say
" unable to move temporary installation. Please close all running R
instances, and try again from a fresh
'R --vanilla' instance"
On Sun, Aug 27, 2017 at 1:41 PM, Jeff Newmiller
wrote:
> I think that this response s
## There is a bug in likert:::plot.likert.
## The centered argument is not handled correctly.
## In addition to centering, it also flips the order.
## Here it is:
likert:::plot.likert(results, type = "bar", centered = TRUE, ## correct order
group.order = c("Band 3", "Band 4")
most likely you have a factor with default levels which are not
ordered the way you want them to be ordered.
You can reorder the levels with the factor function. If you still
need help after adjusting the order of the levels, then
please send the data to the list by including the output of
dput(da
by
>
> hist(x, 100, freq = FALSE)
>
> I’ve experimented with xlim, ylim, without success so far...
>
> url:www.econ.uiuc.edu/~rogerRoger Koenker
> emailrkoen...@uiuc.eduDepartment of Economics
> vox: 217-333-4558 University
Your example is not easily reproducible.
The REBayes requires Rmosek which requires a system command MOSEK.
Please try again with an example using data in base R.
Meanwhile, my guess is that you will need to do something like
explicitly specifying xlim and ylim so all panels have the same
limits.
Please look at ?datasets::randu
for David Donoho's translation of RANDU into R.
On Mon, Aug 14, 2017 at 12:49 PM, Martin Møller Skarbiniks Pedersen
wrote:
> Dear all,
>
> I am trying to learn functions in R and 3D plotting so I decided to try
> to plot
> the famous bad PRNG Randu from IBM(1).
your string opens with single quote ', and has a single quote ' in the middle.
R sees that as the end of the string. You will need to escape the
interior ' with
\'
See ?Quotes
for details.
On Tue, Jul 18, 2017 at 12:48 PM, Christofer Bogaso
wrote:
> Hi again,
>
> Let say I have below string (ar
Two things to look at are
?monthplot
which shows seasonal subseries plotted on an overall plot.
The parallel to your example is small histograms plotted on an overall plot.
That goes back (through the reference in the Blue Book (Becker,
Chambers, and Wilks)) to
Bill Cleveland and Irma Terpenning i
you have only one df for site and one df for year. most likely you
skipped the step of
telling R those are factors.
On Mon, May 15, 2017 at 1:40 PM, Lucy McMahon
wrote:
> R-help:
>
> I'm looking into the abundance of an algal species over site and years using
> a two-way ANOVA:
>
>> summary (ao
Try the 8.3 version of the path name.
dir /w
if I remember correctly.
"Program files" will become progra~1
On Fri, May 5, 2017 at 06:46 Michael Dewey wrote:
> Dear Dominik
>
> Try this
> Open a command window
> Type PATH
> Does the path to where R has stored its executables appear on the P
the link from the FAQ
A discussion with many easily followed examples is in Appendix G
"Computational Precision and Floating Point Arithmetic", pages 753-771
of _Statistical Analysis and Data Display: An Intermediate Course with
Examples in R_, Richard M. Heiberger and Bu
This is the standard behavior of floating point arithmetic on a
digital computer. Computers use 53-bit finite precision arithmetic.
They do not use infinite precision real numbers. Please see FAQ 7.31
for details.
The FAQ is in the R documentation on your computer in file
system.file("../../do
You had a typo.
library(latticeExtra)
Try this. I am solving what I think is a problem related to yours. I set it up
as a three-way plot instead of pasting two of the measures together.
## install.packages("HH") ## if necessary
library(HH)
tmp <- xyplot(x ~ d | a*b*c, data = df2,
par.se
Don asks a good question. Here is the analogy from the grid package.
> library(grid)
> unit(12, "in")
[1] 12in
> unit(12, "cm")
[1] 12cm
> unit.c(unit(12, "in"), unit(12, "cm"))
[1] 12in 12cm
> c(unit(12, "in"), unit(12, "cm"))
[1] 12 12
> ?unit
> convertUnit(c(unit(12, "in"), unit(12, "cm")), "i
## I find it easiest to change the "trellis" object.
## assign the result of your useOuterStrips() call to an object name,
for example
myplot <- useOuterStrips( ... )
## then
names(myplot)
myplot$condlevels
myplot$condlevels$target <- c("much","more","interesting","names","here")
myplot$con
> default values. How can this be done?
>
> Kind regards
>
> Georg
>
>
>
>
> Von:"Richard M. Heiberger"
> An: g.maub...@weinwolf.de,
> Kopie: r-help
> Datum: 28.03.2017 17:40
> Betreff:Re: [R] Way to Plot Multiple Variables and Chan
I think you are looking for the likert function in the HH package.
>From ?likert
Diverging stacked barcharts for Likert, semantic differential, rating
scale data, and population pyramids.
This will get you started. Much more fine control is available. See
the examples and demo.
## install.pa
I will assume that a "quality table" is a LaTeX tabular environment,
possibly with some
nested row or column structures. For that I recommend the latex
function in the Hmisc
package. The examples in ?latex are simple. Quite complex
structures, for example, with
nested sets of labled rows and col
I think you need either
mod4 <- lm( y ~ -1 + area / (month*group), data=two)
mod5 <- lm( y ~ area / (month*group), data=two)
With either of those, area:month and area:group and Residuals add up.
On Sun, Mar 12, 2017 at 10:39 li li wrote:
> Hi All,
> I have a dataset which contains 4 varia
## 1.
## This could be captured into a function
tmp <- matrix(0, 7, 4)
tmp
diag(tmp) <- 1
diag(tmp[-1,]) <- 2
diag(tmp[-(1:2),]) <- 3
diag(tmp[-(1:3),]) <- 4
tmp
## 2.
v <- 1:4
v2 <- c(v, rep(0, length(v)))
## this generates a warning that can safely be ignored (or turned off)
matrix(v2, length(
You need the print() statement. See FAQ 7.22 in file
system.file("../../doc/FAQ")
7.22 Why do lattice/trellis graphics not work?
==
The most likely reason is that you forgot to tell R to display the
graph. Lattice functions such as 'xyplot()' create
Bill,
this looks good. Can you add it to the splus2R package?
Rich
On Sun, Feb 26, 2017 at 11:57 AM, William Dunlap via R-help
wrote:
> You should be looking for foreign::data.restore, not data.dump nor read.S.
>
> In any case, I think that foreign::data.restore does not recognize S-version4
Yes, this is exactly what the panel function
panel.bwplot.intermediate.hh
along with the
position()
function in the HH package was designed for.
Continuing with the example in the linked stackoverflow
df <- structure(list(X1 = c(67.0785968921204, 45.5968692796599,
36.9528452430474,
59.016
The problem with Bert's second example is that sum doesn't work on a list.
The tapply worked correctly.
> unlist(l[1:5])
[1] 1 2 3 4 5
> sum(l[1:5])
Error in sum(l[1:5]) : invalid 'type' (list) of argument
On Tue, Feb 14, 2017 at 8:28 PM, Bert Gunter wrote:
> Hervé:
>
> Kindly explain this, t
labels, and I think it therefore not a good example.
I recommend revising it, perhaps to
old.oma <- par(oma=c(6,1,0,1));
plot(table(state.division), las=2, mgp=c(.5,2,0))
par(old.oma)
I agree the code for the legible labels is difficult to read.
Rich
On Mon, Jan 30, 2017 at 10
terminant", ylab="Frequency")
> >>>
> >>> However, I'm no less puzzled by the "strange" behavior than you.
> >>>
> >>> In addition, it's probably worth noting that xyplot in lattice (and no
> >>
## This example is from R-intro.pdf page 21 (R-3.3.2)
d <- outer(0:9, 0:9)
fr <- table(outer(d, d, "-"))
plot(as.numeric(names(fr)), fr, type="h",
xlab="Determinant", ylab="Frequency")
## The y-axis tick marks are at c(-21,24,65).
## This seems to be because class(fr) == "table"
## Sw
This package uses a nonstandard name colorset.
This is based on the help example for
?charts.PerformanceSummary
> data(edhec)
> charts.PerformanceSummary(edhec[,c(1,13)])
> charts.PerformanceSummary(edhec[,c(1,13)], colorset=c("red","blue"))
>
On Wed, Jan 25, 2017 at 12:44 PM, Bos,
It looks like you are attempting to divide a number by a formula.
> 5 / (a ~ b)
Error in 5/(a ~ b) : non-numeric argument to binary operator
On Fri, Jan 20, 2017 at 12:18 PM, Zeki ÇATAV wrote:
> Hi,
> I'm working on following dataset.
>
>
> > dput(uu5)
> structure(list(grup = structure(c(1L, 1
x <- 10
plot(1:10, main=bquote(R^2 * "=" * .(x)))
On Wed, Jan 18, 2017 at 8:00 PM, Richard M. Heiberger wrote:
> ?plotmath
>
>
> plot(1:10, main=expression(R^2))
>
> plot(1:10, main=bquote(R^2 * "=" * .(x)))
>
> On Wed, Jan 18, 2017 at
?plotmath
plot(1:10, main=expression(R^2))
plot(1:10, main=bquote(R^2 * "=" * .(x)))
On Wed, Jan 18, 2017 at 7:44 PM, Jake William Andrae
wrote:
> Hello,
>
>
> I've added some statistical information as text to some graphs, but I'm
> having a really hard time making the 2 in the R2 label supe
That solved it. Thank you.
On Fri, Jan 13, 2017 at 6:27 AM, Duncan Murdoch
wrote:
> On 13/01/2017 12:46 AM, Richard M. Heiberger wrote:
>>
>> I am preparing for the new semester and have downloaded and installed
>> R-3.3.2 for Macintosh and Windows, and then t
I am preparing for the new semester and have downloaded and installed
R-3.3.2 for Macintosh and Windows, and then the HH package and its
dependencies for both.
Everything fresh off CRAN.
All works correctly on the Macintosh.
On the Windows 10 I am getting an error
> library(HH)
Loading required p
Incrementally increasing the size of an array is not efficient in R.
The recommended technique is to allocate as much space as you will
need, and then fill it.
> system.time({tmp <- 1:5 ; for (i in 1:1000) tmp <- rbind(tmp, 1:5)})
user system elapsed
0.011 0.000 0.011
> dim(tmp)
[1] 1001
I recommend the stem function.
> stem(wt)
The decimal point is 1 digit(s) to the right of the |
12 | 57
14 | 4902479
16 | 1233444349
18 | 002507
> stem(wt, 2)
The decimal point is 1 digit(s) to the right of the |
13 | 57
14 | 49
15 | 02479
16 | 1233444
17 | 349
18 | 00
I reproduced your graphs, but I don't understand what you want instead.
There are several problems.
one group is spelled "Lantinx".
your factor statements mostly lead to NA values.
The two panels of the plot do not use the same number of inches of
the plotting window, due to different widths
I think the intended appearance is closer to this
xyplot(Sepal.Length + Sepal.Width ~ Petal.Length + Petal.Width,
iris,
type = c("p", "r"),
jitter.x = TRUE,
jitter.y = TRUE,
factor = 5,
key = list(between=c(-4.5),
column=4,
text=list(lab=paste0(" ", letters[1:4], "
Yes, but it will probably require work. I think you will need to
write a grob that does what you want
and then use the grob in a legend statement in the xyplot.
Start with the 'legend' argument to xyplot (about line 940 in ?xyplot).
You will probably need to work directly with grid functions and
You have read your Date variable in as a character variable, which was
coerced to a factor.
You probably wanted the values to be interpreted as dates. example of
what to do is below.
Note that the date-factor levels are sorted alphabetically, which is
almost certainly not what you want.
In additi
The specific error message you are getting says that there are
non-ASCII characters
in one of your .Rd files. You can locate them with the
tools::showNonASCII function.
library(tools)
?showNonASCII
Replace them with ASCII characters and the packaging should work.
If you really need the non-ASCI
As Petr Pikal mentioned, the difficulty in interpretation is entirely due
to the set of contrasts you chose.The default treatment contrasts are
not orthogonal and are therefore the most difficult to interpret.
The note in ?aov warns of this difficulty.
sum contrasts will give you numbers that are
I will recommend my book.
http://www.springer.com/us/book/9781493921218
Sent from my iPhone
> On Dec 2, 2016, at 11:07, peter dalgaard wrote:
>
> Also notice that there are relatively inexpensive books. Mine and Bob
> Muenchen's for instance, which tackle your situation from somewhat differen
James,
Please look at the maiz example, the last example in ?MMC
help("MMC", package="HH")
where I show how to construct and calculate a set of orthogonal contrasts
for a factor in an analysis of variance setting. mmc and mmcplot use glht
in the multcomp package for the underlying calculations.
## Use the split argument to summary.aov
## This tests the levels of tension within each level of wool using a common
## Residuals sum of squares.
sapply(warpbreaks, levels)
model2 <- aov(breaks ~ wool/tension, data = warpbreaks)
colnames(model.matrix(model2))
## [1] "(Intercept)""woolB"
nBuyMat <- data.frame(matrix(rnorm(28), 7, 4))
nBuyMat
nBuy <- nrow(nBuyMat)
sample(1:nBuy, nBuy, replace=FALSE)
sample(1:nBuy)
sample(nBuy)
?sample
apply(nBuyMat[sample(1:nBuy,nBuy, replace=FALSE),], 1, function(x) sum(x))
apply(nBuyMat[sample(nBuy),], 1, function(x) sum(x))
The defaults for sa
It depends what "Data Analytics" means. Is it more or less, or just a
synonym, for "Statistics"? My book, "Statistical Analysis and Data
Display: An Intermediate Course with Examples in R" 2nd edition,
Springer 2015 could support about half of a Design of Experiments
course for MS in Statistics.
I think this is simpler.
vol_p2 <- vol_p
vol_p2$legend <- NULL
print(update(vol_p2, scales=list(y=list(labels=FALSE))), split = c(1,
2, 1, 2), more = TRUE)
draw.colorkey(vol_p$legend$right$args$key, draw=TRUE,
vp=viewport(y=.27, height=.26, x=.75))
print(update(xy_p, scales=list(y=list(labels=FALS
I believe you have missing values and therefore you need to use
the argument
glm(formula, data, na.action=na.exclude, ...)
?na.exclude
The relevant line is
when 'na.exclude' is used the residuals and
predictions are padded to the correct length by inserting 'NA's
for cases omitted
101 - 200 of 832 matches
Mail list logo