Displaying 20 results from an estimated 2000 matches similar to: "xyplots"
2004 Dec 03
1
isotonic regression
Hi,
Has anyone written code for isotonic regression on ordered rectangular
grids?
Nathan
Nathan Leon Pace, MD, MStat
University of Utah
Salt Lake City, UT 84132
Office: 801.581.6393
Fax: 801.581.4367
Cell: 801.558.3987
Pager: 801.291.9019
Home: 801.467.2925
[[alternative text/enriched version deleted]]
2010 Jan 17
3
enty-wise closest element
Dear R-users,
i have a simple problem maybe, but i don't see the solution. i want to
find the entry-wise closest element of an vector compared with another.
ind1<-c(1,4,10)
ind2<-c(3,5,11)
for (i in length(ind2):1)
{
print(which.min(abs(ind1-ind2[i])))
}
for ind2[3] it should be ind1[3] 10, for ind2[2] it should be ind1[2] 4
and for ind2[1] it should be ind1[1] 1. but with the
2011 Mar 10
2
within group sequential subtraction
Hi Everyone,
I would like to do sequential subtractions within a group so that I know the
time between separate observations for a group of individuals.
My data:
data <- structure(list(group = c("IND1", "IND1", "IND2",
"IND2", "IND2", "IND3", "IND4", "IND5",
"IND6", "IND6"), date_obs =
2010 May 03
3
how to rewrite this for loops in matrix form without loop
x0=rnorm(100)
y0=rpois(100,3)+1
ind=as.data.frame(table(y0))
ind1=ind[,1]
ind2=ind[,2]
phi=NULL
for (i in 1:length(ind2)){
phi[i]=sum(x0[y0==ind1[i]])/ind2[i]
}
[[alternative HTML version deleted]]
2009 Sep 11
2
Accumulating results from "for" loop in a list/array
Dear R users,
I would like to accumulate objects generated from 'for' loop to a list or
array.
To illustrate the problem, arbitrary data set and script is shown below,
x <- data.frame(a = c(rep("n",3),rep("y",2),rep("n",3),rep("y",2)), b =
c(rep("y",2),rep("n",4),rep("y",3),"n"), c =
2011 Jul 27
1
color of error bars in Dotplot (Hmisc)
Hello!
In a grouped Dotplot, is there any way to set the color of error bars
to be the same as the corresponding symbols?
Example data:
require(lattice)
require(Hmisc)
data(barley)
Dotplot(variety~Cbind(yield, yield+2, yield-2)|year, groups=site,
data=barley)
I experimented with changing trellis settings of plot.line (as
mentioned in the Hmisc documentation) as well as col.line settings in
2011 Dec 04
2
frequency table?
Hello R-users,
I've got a file with individuals as colums and the clusters where they occur
in as rows. And I wanted a table which tells me how many times each
individual occurs with another. I don't really know how such a table is
called...it is not a frequency table....My eventual goal is to make
Venn-diagrams from the occurence of my individuals.
So I've this:
cluster ind1 ind2
2011 Mar 09
2
Cleaning date columns
Hi Everyone,
I have the following problem:
data <- structure(list(prochi = c("IND1", "IND1", "IND1",
"IND2", "IND2", "IND2", "IND2", "IND3",
"IND4", "IND5"), date_admission = structure(c(6468,
6470, 7063, 9981, 9983, 14186, 14372, 5129, 9767, 11168), class = "Date")),
.Names =
2006 Jul 07
2
dotplot (lattice) with panel.segments and groups
Hi,
The following produces almost exactly what I needed. The problems are
that the 'panel.dotplot' call (commented) generates the error 'Error in
NextMethod("[") : argument "subscripts" is missing, with no default'. The
other problem is that the colors alternate between the levels of the 'site'
variable, rather than 'year'.
barley$yield2
2011 Dec 04
1
similarity matrix
Hello R-users,
I've got a file with individuals as colums and the clusters where they occur
in as rows. And I wanted a similarity matrix which tells me how many times
each individual occurs with another. My eventual goal is to make
Venn-diagrams from the occurence of my individuals.
So I've this:
cluster ind1 ind2 ind3 etc.
1 0 1 2
2 3 0 1
3
2009 Jul 09
1
Converting indices of a matrix subset
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
I have two matrices:
> m1 <- matrix(1,4,4)
> m1
[,1] [,2] [,3] [,4]
[1,] 1 1 1 1
[2,] 1 1 1 1
[3,] 1 1 1 1
[4,] 1 1 1 1
> m2 <- matrix(0,3,3)
> diag(m2) <- 1
> m2
[,1] [,2] [,3]
[1,] 1 0 0
[2,] 0 1 0
[3,] 0 0 1
I want to get indicies from m2
2005 Jan 17
2
Omitting constant in ols() from Design
Hi!
I need to run ols regressions with Huber-White sandwich estimators and
the correponding standard errors, without an intercept. What I'm trying
to do is create an ols object and then use the robcov() function, on the
order of:
f <- ols(depvar ~ ind1 + ind2, x=TRUE)
robcov(f)
However, when I go
f <- ols(depvar ~ ind1 + ind2 -1, x=TRUE)
I get the following error:
Error in
2011 Dec 03
1
pivot table help
Hello R-users,
I've got a huge table with about 20.00 rows and 50 columns. The table now
has headers as Members1, Members2 etc. My data are 8 different individuals.
And I've got a column with clusters. So each individual belongs to different
clusters and can occurs multiple times within a cluster (that's the reason
that there can be more than 8 members). I want a presence/ absence
2006 Feb 10
1
precision of std. error in summary
Hi,
I'm doing robust regression with the following command
rlm(dip~ind1+ind2-1,method="M",psi=psi,maxit=1000,acc=1e-15)
now when I ask for a summary
summary(rlm(dip~ind1+ind2-1,method="M",psi=psi,maxit=1000,acc=1e-15))
I get
Coefficients:
Value Std. Error t value
ind1 -0.0377 0.0000 -24203.1415
ind2 1.0370 0.0000 668735.7195
taht is
2011 Aug 10
2
choosing selective data with permutations
Hello,
I am a R beginner and hoping to obtain some hints or suggestions about
using permutations to sort a data set I have.
Here is an example dataset:
Ind1 11 00 12 15 28
Ind2 21 33 22 67 52
Ind3 22 45 21 22 56
Ind4 11 25 74 77 42
Ind5 41 32 67 45 22
This will be read into a variable using read.table. What I want to do
is permute these individuals and every
2015 Nov 20
1
Good practice for naming classes, builders, attributes, getters/setters for object composition
Hey everyone,
I am developing a package and I am wondering if there is a good practice
for naming classes, builders, attributes getters and setters when dealing
with object composition. I know that it is usually a good practice to give
to the builder the same name as the class and, if possible, to avoid to use
upper case letters. My problem is that, when I build an object containing
an other
2004 Sep 29
2
lattice .ps graphic is rotated in LaTeX slides
I've generated a version of the classic dotplot of the barley data with
library(lattice)
data(barley)
trellis.device("postscript", color=TRUE, file="barley2x3.ps")
old.settings <- trellis.par.get()
trellis.par.set("background", list(col = "white"))
lset(list(superpose.symbol=list(pch=c(19, 1, 25, 2, 15, 22, 23),
2011 Dec 05
1
Subsetting a data frame
Hi R users,
I really need help with subsetting data frames:
I have a large database of medical records and I want to be able to match
patterns from a list of search terms .
I've used this simplified data frame in a previous example:
db <- structure(list(ind = c("ind1", "ind2", "ind3", "ind4"), test1 = c(1,
2, 1.3, 3), test2 = c(56L, 27L, 58L,
2004 Dec 05
3
boot package
Hi,
I using the boot package 1.2-20 on R 2.0.1.
My statistics function estimates 6 parameters.
In a small percentage of resampled data sets my statistics function
doesn't produce an estimate for one parameter and the boot function
stops with an error.
I can write an ifelse(exists('parameter.estimate'), parameter.estimate,
NA) statement within the statistic function to substitute
2002 Aug 24
1
nlme
In the non linear mixed effects package a groupedData object can be
created to facilitate modeling.
The gD object includes a formula of the form 'response variable' ~
'primary covariate' | 'grouping factor'.
In experiments creating response surfaces there are 2 or more primary
covariates.
Is there any way to use the groupedData() function to include 2 primary