Displaying 20 results from an estimated 110 matches similar to: "barplot with more than 1 variable"
2011 Jul 27
2
for loop help
I am having a hard time putting the below into a loop, where it pulls out ppt from all he stations I have versus having to go through and hard code the data to the specific stations. I tried
stnID <- stnid[which(duplicated(stnid)==FALSE)]
for(i in 1:length(stnID))
{
ppt[i] <- ppt[which(stnid==[i])]
}
but it doesn't like to use the which function inside a for loop? Any idea's here is
2006 Aug 24
1
Using a 'for' loop : there should be a better way in R
I need to apply a yearly inflation factor to some
wages and supply some simple sums by work category. I
have gone at it with a brute force "for" loop approach
which seems okay as it is a small dataset. It looks
a bit inelegant and given all the warnings in the
Intro to R, etc, about using loops I wondered if
anyone could suggest something a bit simpler or more
efficent?
Example:
2007 Jun 29
1
Assign name to a name
I would like to know how I can assign a name to a name. I have a
dataset that has different years in it. I am writing scripts using R
and I would like to give a month a generic name and then use the generic
name to do different analysis. The reason for the generic name would be
so that I only have to change one thing if I wanted to change the year.
For example.
Year1 = 1999
datayear <-
2011 Feb 18
2
R script HELP!
The following is my R script which I am struggling with to assess ICESat
data..perhaps it is the ID_min or ID_max that is wrong? I don't know, any
help would be greatly appreciated :(
# OPTIONS - CHANGE THESE VARIABLES IF NEEDED\par
######################################################################\par
\par
icesatfile <-
2010 Jan 30
2
drawing a line that shifts from solid to broken
I am graphing longitudinal data from three time points. I'd like to draw a
solid line from point 1 to point 2, and then a dashed line from point 2 to
point 3. It works if I do it in two steps:
> first.vector <- c(mean(year1$variable1), mean(year2$variable1))
> second.vector <- c(NA, mean(year2$variable1), mean(year3$variable1))
> plot(first.vector, type="b",
2010 Aug 20
1
Shifting of Principal amount while calculating Present Value
Dear R Helpers
I have following data -
cash_flow = c(7, 7, 107) # 107 = Principle 100 + interest of 7%
t = c(1,2,3)
and zero rate table as
rating year1 year2 year3
AAA 3.60 4.17 4.73
AA 3.65 4.22
4.78
A 3.72 4.32 4.93
BBB 4.10
2013 Apr 03
1
linear model coefficients by year and industry, fitted values, residuals, panel data
Hi R-helpers,
My real data is a panel (unbalanced and with gaps in years) of thousands of firms, by year and industry, and with financial information (variables X, Y, Z, for example), the number of firms by year and industry is not always equal, the number of years by industry is not always equal.
#reproducible example
firm1<-sort(rep(1:10,5),decreasing=F)
year1<-rep(2000:2004,10)
2013 Jun 07
4
matched samples, dataframe, panel data
I R-helpers
#I have a data panel of thousands of firms, by year and industry and
#one dummy variable that separates the firms in two categories: 1 if the firm have an auditor; 0 if not
#and another variable the represents the firm dimension (total assets in thousand of euros)
#I need to create two separated samples with the same number os firms where
#one firm in the first have a corresponding
2012 Jun 24
2
Defining multiple variables in a loop
Good day,
For lack of a better solution (or perhaps I am ignorant to something
more elegant), I have been bootstrapping panel data by hand so to
speak and I would like to know if there is a way to define multiple
variables in a loop using the loop variable. I found a post (here:
https://stat.ethz.ch/pipermail/r-help/2002-October/026305.html ) that
discussed naming multiple variables but it
2011 Aug 03
1
Need help with xyplot
Consider I have the following data:
AgeRange AgeOfPerson PersonNo FriendsAtYear0 FriendsAtYear1 FriendsAtYear2 FriendsAtYear3 FriendsAtYear4 FriendsAtYear5
10 - 12 11 1 0 1 2 2 3 3
10 - 12 12 2 0 1 2 2 3 3
15 - 18 13 3 1 2 3 4 6 7
15 - 18 14 4 1 3 4 5 7 7
30 - 40 33 5 3 5 5 6 8 9
30 - 40 36 6 4 4 4 4 4 4
I want to plot the number of friends against number of years, as to show how friendships
2010 Mar 02
1
bigglm Memory Issues
Hi all,
I'm somewhat of a novice in terms of programming, so I thought I'd come here to seek some help with an issue I'm having.
I'm trying to model a glm using bigglm, but in spite of my best efforts, I cannot get it to work!
Here is the particular line of code that is giving me trouble:
>mod = bigglm(Pres/wt ~ Xdes, data=dat, family=poisson(), weights = ~wt, maxit=100,
2009 Apr 16
0
incorrect handling of NAs by na.action with lmList (package nlme) (PR#13658)
Greetings,
I just found out a bug in the function lmList of the package nlme with R
2.8.1 running under windows XP 32-bits. I have a data table with various
columns corresponding to continuous variables as well as treatment
variables taken on several years and several sites. Here is an example :
Id year treatment A treatment B variable1
variable2 variable3
1
2008 Oct 12
0
false convergence (8) after removal of the two-way interaction
Dear All,
I am working with a generalized linear mixed-effects model with poisson error using the lme4 package in R. I created a model with the lmer function including some main effects, three two way interactions and two random effects.
The model works well, but I have troubles when removing on of the two-way interactions. The Warning message: "In mer_finalize(ans) : false convergence
2012 Apr 10
3
[PATCH 0/2] adding tracepoints to vhost
To help in vhost analyzing, the following series adding basic tracepoints to
vhost. Operations of both virtqueues and vhost works were traced in current
implementation, net code were untouched. A top-like satistics displaying script
were introduced to help the troubleshooting.
TODO:
- net specific tracepoints?
---
Jason Wang (2):
vhost: basic tracepoints
tools: virtio: add a
2012 Apr 10
3
[PATCH 0/2] adding tracepoints to vhost
To help in vhost analyzing, the following series adding basic tracepoints to
vhost. Operations of both virtqueues and vhost works were traced in current
implementation, net code were untouched. A top-like satistics displaying script
were introduced to help the troubleshooting.
TODO:
- net specific tracepoints?
---
Jason Wang (2):
vhost: basic tracepoints
tools: virtio: add a
2012 Nov 16
1
Interpretation of davies.test() in segmented package
My data:
I have raw data points that form a logit style curve as if they were a time
series. Which is to say they form 3 distinct lines with 3 distinct slopes
in backwards z pattern. A certain class of my data looks essentially flat
to the eye with marginal oscillation. What is important to me is the x
value at which the state change is occurring, in other words, the break
point
Use of
2012 May 03
2
Very small random effect estimation in lmer but not in stata xtmixed
Hi folks
I am using the lmer function (in the lme4 library) to analyse some data where individuals are clustered into sets (using the SetID variable) with a single fixed effect (cc - 0 or 1). The lmer model and output is shown below.
Whilst the fixed effects are consistent with stata (using xtmixed, see below), the std dev of the random effect for SetID is very very small (3.5803e-05)compared to
2014 Mar 21
5
[PATCH RFC V2 0/4] Adding tracepoints to vhost/net
Recent debugging on vhost net zerocopy shows the need of
tracepoints. So to help in vhost{net} debugging and performance
analyzing, the following series adding basic tracepoints to
vhost. Operations of both vhost and vhost_net were traced in current
implementation.
A top-like satistics displaying script were introduced to help the
troubleshooting:
vhost statistics
vhost_virtio_update_used_idx
2014 Mar 21
5
[PATCH RFC V2 0/4] Adding tracepoints to vhost/net
Recent debugging on vhost net zerocopy shows the need of
tracepoints. So to help in vhost{net} debugging and performance
analyzing, the following series adding basic tracepoints to
vhost. Operations of both vhost and vhost_net were traced in current
implementation.
A top-like satistics displaying script were introduced to help the
troubleshooting:
vhost statistics
vhost_virtio_update_used_idx
2007 Jul 04
0
how to plot a monthplot from a ts object where all individual years are shown (e.g. as lines) and can be compared with a "average or median " year?
Dear R help,
I'm working with regular 8-daily time-series from 2000 up till now and
would like to be able to compare years with each other. E.g. by creating
a monthplot via the result of the stl() method it looks ok> but I was
wondering whether there exist other methods to plot the different years
as lines on top of each other such that years can be compared with each
other (temporal