Displaying 20 results from an estimated 1000 matches similar to: "Selecting Bootstrap Statistics in the boot package"
2009 Jan 27
1
Plotmath and line breaks in long annotations for plots
I'm trying to combine multi-line text and math annotations on a plot
and am not having much luck. I looked at various suggestions in the
archives, but I cannot coerce any of them to do what I want. I'm
beginning (finally?!) to think that there is an entirely better
approach than the one I have tried.
The essential problem is that line breaks (\n) don't seem to behave
the way I
2012 Aug 05
1
trouble with looping for effect of sampling interval increase
I've looked everywhere and tinkered for three days now, so I figure asking
might be good.
So here's a general rundown of what I am trying to get my code to do I am
giving you the whole rundown because I need a solution that retain certain
ways of doing things because they give me the information i need.
I want to examine the effect of increasing my sampling interval on my data.
Example:
2011 Dec 05
1
Problem in while loop
Hi all,
I have the following code,
When I run the code, it never terminate this is because of the while loop i
am using. In general, if you need a loop for which you don't know in
advance how many iterations there will be, you can use the `while'
statement so here too i don't know the number how many iterations are
there. So Can some one suggest me whats going on?
I am using the
2012 Mar 27
1
Rgdal package - get information
>
> Hi,
>
> I used
> GDALinfo("MOD13Q1.A2001049.h13v11.005.2007002215512.250m_16_days_EVI.tif") and
> got the results:
>
> rows 10
> columns 11
> bands 1
> origin.x 150701.4
> origin.y 7744897
> res.x 250
> res.y 250
> ysign -1
> oblique.x 0
> oblique.y 0
> driver GTiff
>
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 =
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 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 =
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]]
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
2005 Apr 25
6
Proba( Ut+2=1 / ((Ut+1==1) && (Ut==1))) ?
Dear all,
First I apologize if my question is quite simple,
but i'm very newbie with R.
I have vectors of the form v = c(1,1,-1,-1,-1,1,1,1,1,-1,1)
(longer than this one of course).
The elements are only +1 or -1.
I would like to calculate :
- the frequencies of -1 occurences after 2 consecutives -1
- the frequencies of +1 occurences after 2 consecutives +1
It looks probably something like
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
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
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 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
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
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 Apr 27
4
Problems raised to 1/3 power and NaN
I am debugging some code and found a function that returns and error most of the time. I have issolated the problem to when it raises an argument to the 1/3 power but for the life of me I can not figure out why it is not working. i have gone through the FAQs and have found nothing (not to say I might have missed something). I am highly embarrased with my inability find the problem (my face is
2009 Aug 09
1
problem adding columns to matrix
Hi all, i purchased a copy of the book Morphometrics with R by Springer.
at the end of each chapter there are exercises to train what you just
read and (hope) learned...
so i have this problem:
Define a hypothetical data frame containing five measurments normally
distributed(size,head,pectoral,area,weight) for four individuals
(named ind1, ind2, etc). ADD A COLUMN corresponding to the
2009 Mar 19
2
Randomly splitting a data frame in half
I have a data frame in long format and I would like to randomly divide
this data frame in half. The data frame consists of 39622 rows and I
initially tried ...
randomsample1 <- data[sample(nrow(data),19811), ]
Where allows me to randomly select half of the rows and assign them to
randomsample1 but then I couldn't figure out how to select those rows
that were not selected and assign