Displaying 20 results from an estimated 400 matches similar to: "Decompose numerical factor into orthog. poly parts"
2002 Oct 31
7
Symbols for male/female
Dear all,
I would like to use the biological symbols for male and female as plotting
symbols in a scatterplot (ideally filled and non-filled). R does not seem
to have these symbols using pch= in plot() nor are they implemented via
expression() or at least I did not find them. I found that the symbols are
e.g. available in the wasysym and the marvosym package in LaTeX.
I have coded two very rough
2002 Oct 31
7
Symbols for male/female
Dear all,
I would like to use the biological symbols for male and female as plotting
symbols in a scatterplot (ideally filled and non-filled). R does not seem
to have these symbols using pch= in plot() nor are they implemented via
expression() or at least I did not find them. I found that the symbols are
e.g. available in the wasysym and the marvosym package in LaTeX.
I have coded two very rough
2016 Apr 02
3
apply mean function to a subset of data
Dear all;
This must have a rather simple answer but haven't been able to figure it
out: I have a data frame with say 2 groups (group 1 & 2). I want to select
from group 1 say "n" rows and calculate the mean; then select "m" rows from
group 2 and calculate the mean as well. So far I've been using a for loop
for doing it but when it comes to a large data set is
2009 Oct 23
3
opposite estimates from zeroinfl() and hurdle()
Dear all,
A question related to the following has been asked on R-help before, but
I could not find any answer to it. Input will be much appreciated.
I got an unexpected sign of the "slope" parameter associated with a
covariate (diam) using zeroinfl(). It led me to compare the estimates
given by zeroinfl() and hurdle():
The (significant) negative estimate here is surprising, given
2016 Apr 02
0
apply mean function to a subset of data
Hi Pedro,
This may not be much of an improvement, but it was a challenge.
selvec<-as.vector(matrix(c(nsel,unlist(by(toy$diam,toy$group,length))-nsel),
ncol=2,byrow=TRUE))
TFvec<-rep(c(TRUE,FALSE),length.out=length(selvec))
toynsel<-rep(TFvec,selvec)
by(toy[toynsel,]$diam,toy[toynsel,]$group,mean)
Jim
On 4/3/16, Pedro Mardones <mardones.p at gmail.com> wrote:
> Dear all;
>
2016 Apr 03
1
apply mean function to a subset of data
Here are several ways to get there, but your original loop is fine once it is corrected:
> for (i in 1:2) smean[i] <- mean(toy$diam[toy$group==i][1:nsel[i]])
> smean
[1] 0.271489 1.117015
Using sapply() to hide the loop:
> smean <- sapply(1:2, function(x) mean((toy$diam[toy$group==x])[1:nsel[x]]))
> smean
[1] 0.271489 1.117015
Or use head()
> smean <- sapply(1:2,
2006 Aug 09
1
nested ANOVA using lme
I have an ANOVA model with 2 factors "Environment" and "Site",
"Diameter" is the response variable. Site should be nested within
Environment. Site is also a random factor while Environment is fixed. I
can do this analysis using the "aov" function by using these commands:
>model<-aov(Diam~Env+Error(Env%in%Site),data=environ)
>summary(model)
2010 Oct 03
1
scatterplot error message
Hi All. I am a new R user. Trying to do scatterplot. Not sure how to
resolve this error message
A<-subset (ErablesGatineau, station=="A")
> B<-subset (ErablesGatineau, station=="B")
>
> plot(diam ~ biom)
> abline(lm(diam ~ biom), col = "red")
>
> goodcases <- !(is.na(diam) | is.na(biom))
> lines(lowess(diam[goodcases] ~
2006 Jan 25
1
How to use rfm.test ? (Package MarkedPointProcess)
I would like to compute the MC test (rfm.test) available in the package MarkedPointProcess (for the data BITOEK for example) in order to test the
dependence between the marks and their locations. Why the syntax of rfm.test is false here? I have the message :
******************************
ML WARNING! Forbidden values! -- if there are too many warnings try narrower lower and upper bounds for the
2006 Jan 26
1
[R-SIG-Mac] Hist for different levels of a factor
The list of your interest is R-help not R-sig-mac
stefano
Il giorno 26/gen/06, alle ore 01:20, Sylvain Charlat ha scritto:
> Hi,
>
> Is there any simple way to get histogram for different levels of
> factor?
>
> Say you have the following data set:
>
> Island Sp.diam
> Moorea 1.21
> Moorea 1.27
> Moorea 1.28
> Moorea 1.22
> Moorea 1.28
> Rurutu
2013 Feb 02
2
create and save a simulated dataset
Hello,
I am trying to learn how to create a simulated dataset of a forest stand:
I must simulate 10 stands, for each of the stands I have been creating a random number of trees. For each tree I should create a random diameter.
The problem I have is that I cannot use a matrix because the length of the three items is different. I was trying with list but I have no clue on how to make a dataset out
2006 Mar 16
1
ANCOVA with random factor
I would like to know if there is a way of directly calculating the
F-ratio of a random effect using the "aov" function. I have 2 factors
in my model, "population" which is random and "length" which is the
length of female fish within each population. The dependent variable is
"diam" which is the average diameter of eggs produced by each female.
At
2006 Jan 28
7
cool components in the form
Is there a easy way to add components like:
http://www.dynarch.com/projects/calendar/
http://tinymce.moxiecode.com/example_full.php?example=true
in ruby forms, by plugins or whatever?
Thank you
Rodrigo Dom?nguez
Iplan Networs
www.iplan.com.ar <http://www.iplan.com.ar/> ? rdominguez@iplan.com.ar
www.rorra.com.ar <http://www.rorra.com.ar/> ? rorra@rorra.com.ar
--------------
2005 Jul 12
3
adding a factor column based on levels of another factor
Hi R users
Does anyone out there have a better/quicker way of adding a factor column
to a data frame based on levels of another factor?
I have a (large) data frame consisting of records for individual plants,
each represented by a unique ID number. The species of each plant is
indicated in the column "species", which is a factor column with many
different levels (species). There are
2010 Oct 04
1
Splitting a DF into rows according to a column
Hi,
I'm turning my wheels on this and keep coming around to the same wrong
solution - please have a look and give a hand ...
The premise is: a DF like so
> loremIpsum <- "Lorem ipsum dolor sit amet, consectetur adipiscing elit.
Quisque leo ipsum, ultricies scelerisque volutpat non, volutpat et nulla.
Curabitur consequat ullamcorper tellus id imperdiet. Duis semper malesuada
2006 Sep 18
1
PHP Dingus Fix
I just realised I hadn't updated the version of PHP Markdown and
Extra on the dingus as I pretended I did in my two announcements. It
is now fixed: PHP Markdown 1.0.2b7 and PHP Markdown Extra 1.1b1 can
now be tested on the dingus.
<http://www.michelf.com/projects/php-markdown/dingus/>
Sorry for any inconvenience.
Michel Fortin
michel.fortin@michelf.com
http://www.michelf.com/
2013 Sep 23
2
One node and several environments
I would like to use additional puppet environment for "fast response"
configuration and run it every minute. For that I''ve created new light
environment with only one module. But I don''t know how to configure puppet
master manifests for one node with two environments? Is it possible?
I''ve found a manual
2005 Oct 04
2
newbie questions - looping through hierarchial datafille
Dear List,
Im new to R - making a transition from SAS. I have a space delimited file
with the following structure. Each line in the datafile is identified by
the first letter.
A = Inventory (Inventory)
X = Stratum (Stratum_no Total Ye=year established)
P = Plot (Plot_no age slope= species)
T = Tree (tree_no frequency)
L = Leader (leader diameter height)
F = Feature (start_height finish_height
2011 Apr 06
0
Proposed modification to decompose() and plot.decomposed.ts()
The decompose() function truncates the seasonal component
unnecessarily. I've modified the function to fix this problem, and
also added the original data to the object returned (to enable better
plotting).
I've also modified the plot.decomposed.ts() function so that it plots
the original data in the top panel rather than the reconstructed data.
The difference between the two is that the
2012 Jun 15
0
decomposing decompose(), issue?
Hi
I'm just stepping through the decompose() function, in "stats". Does
this contained line of code not work if you have a time series ending
"unevenly" (i.e., middle of the year), or am I missing something?
season <- na.omit(c(as.numeric(window(season, start(x) +
c(1, 0), end(x))), as.numeric(window(season, start(x),
start(x) + c(0, f)))))
The line seems to