similar to: Subset and point plot

Displaying 20 results from an estimated 5000 matches similar to: "Subset and point plot"

2010 Feb 02
2
Subset and plot
Here is a runable program. When I plot Day and Wgt, it graphs all the data points. All I need is daily.sub1 plotted. I also need each "Tanks" to have its own col or pch. When I run it with the line with pch, it gives me nothing. rm(list=ls()) Trial<-rep(c(1,2),each=12) Tanks=rep(c("a3","a4","c4","h4"),each=3,2) Day=rep(c(1:12),2)
2010 Jan 09
1
Boxplots
I have a data set with four columns and need to make boxplots from them. Data is as follows: tank Tanks Total cons_hat 1 a a4 5.651017 5.59 2 a a5 5.017499 5.29 3 a a6 4.894238 4.69 4 c c4 3.986347 3.40 5 c c5 4.099442 3.58 6 c c6 4.150522 3.64 7 h h4 5.187792 6.32 8 h h5 6.713422 6.44 9 h h6 5.168555
2010 Jan 11
1
Point plot comparisions
I would like to create a point plot with the following two sets of points: #1 plot(Day,Total) and #2 (Day,cons_hat). Total is the actual value seen and cons-hat is a predicted value. If possible, I do not want to stack them as they are quite long. (FYI, I did use the reshape on a previous post, thanks, but this one is different). Day Tank Tanks Total cons_hat 1 a a4 5.651017 5.59
2011 Dec 12
2
Colours for sunflowerplot
Dear fellow R users, I would like to draw a "sunflowerplot" because I have data (decade by month) that plots multiple times on the same x-y co-ordinates. Further I would like to colour each of the points/sunflower leaves on the plot according to the group they belong to (i.e. which type of event each represents within that decade and month). I thought that this would be relatively
2018 May 03
4
adding overall constraint in optim()
Hi ? This is giving me a headache. I?m trying to do a relatively simple optimization ? actually trying to approximate the output from the Excel Solver function but at roughly 1000x the speed. ? The optimization parameters look like this. The only trouble is that I want to add a constraint that sum(wgt.vect)=1, and I can?t figure out how to do that in optim. Mo.vect <-
2018 May 06
1
adding overall constraint in optim()
Hi Michael, A few comments 1. To add the constraint sum(wgt.vect=1) you would use the method of Lagrange multipliers. What this means is that in addition to the w_i (the components of the weight variables) you would add an additional variable, call it lambda. Then you would modify your optim.fun() function to add the term lambda * (sum(wgt.vect - 1) 2. Are you sure that you have defined
2018 May 03
0
adding overall constraint in optim()
You can't -- at least as I read the docs for ?optim (but I'm pretty ignorant about this, so maybe there's a way to tweak it so you can). See here: https://cran.r-project.org/web/views/Optimization.html for other R optimization capabilities. Also, given your credentials, the r-sig-finance list might be a better place for you to post your query. Cheers, Bert Bert Gunter
2004 Sep 21
2
Ever see a stata import problem like this?
Greetings Everybody: I generated a 1.2MB dta file based on the general social survey with Stata8 for linux. The file can be re-opened with Stata, but when I bring it into R, it says all the values are missing for most of the variables. This dataset is called "morgen.dta" and I dropped a copy online in case you are interested http://www.ku.edu/~pauljohn/R/morgen.dta looks like this
2018 May 03
2
adding overall constraint in optim()
Thanks Bert. But everyone on that forum wants to use finance tools rather than general optimization stuff! And I am not optimizing a traditional Markowitz mean-variance problem. Plus, smarter people here. :-) > On May 3, 2018, at 3:01 PM, Bert Gunter <bgunter.4567 at gmail.com> wrote: > > You can't -- at least as I read the docs for ?optim (but I'm pretty > ignorant
2018 May 04
0
adding overall constraint in optim()
On Thu, May 3, 2018 at 2:03 PM, Michael Ashton <m.ashton at enduringinvestments.com> wrote: > Thanks Bert. But everyone on that forum wants to use finance tools rather than general optimization stuff! And I am not optimizing a traditional Markowitz mean-variance problem. Plus, smarter people here. :-) > I'm very confused by these statements. Most of the "finance tools"
2010 Feb 10
2
simple subtraction in a single vector
OK, this is very elementary, but I need help. I have looked in Verzani, past postings etc. Problem: I need to subtract the "length" date between "h4" and "a3" #which would be 4-1 I would rather not convert the two columns into four columns (with headings being "a3","a4","c4","h4"). DF <- data.frame(length=c(1,2,3,4),
2009 May 31
1
Bug in gmodels CrossTable()?
Is the code below showing a bug in Crosstable()? My expectation was that the values produced by xtabs were rounded instead of truncated: library(gmodels) abc <- c("a", "a", "b", "b", "c", "c") def <- c("d", "e", "f", "f", "d", "e") wgt <- c(0.8, 0.6, 0.4, 0.5, 1.4, 1.3)
2006 Apr 19
1
Trouble with glm() .... non-integer #successes in a binomial glm
Hi R-people: When I use the command to fit a model with an intercept, only: glm ( formula=haspdata ~ 1, data=dat, family=binomial, weights= dat$hy.wgt.s, subset=(dat$haspdat0!=3) ) I get the message: Warning message: non-integer #successes in a binomial glm! in: eval(expr, envir, enclos) Does anyone know what this means?? The data for this command is listed below. Thanks, Phil Smith CDC
2010 Sep 27
3
Alphabetical sequence of data along the x-axis in a box plot
Hello All, I noticed when I generated some boxplots, the data is presented in alphabetical order along the x-axis (the data in this case was the four quandrants of a sample area (NE,NW, SE, SW) that was my first column of data). Is there a way to have R plot the data in a different order? I imagine you could use a dummy variable, but didn't know if there might be a simple argument that
2006 Jun 03
2
looking for radrails devs
I just got an email update on a radrails bug that I submitted a while back... Unfortunately, it''s just stupid spammers. So, I tried to go to the radrails trac to delete the spam or at least report it, and their trac is puking python errors (including environment information) all over the page! I can''t seem to get to any pages with any contact info, so I''m trying
2009 Nov 14
4
Weighted descriptives by levels of another variables
I've noticed that R has a number of very useful functions for obtaining descriptive statistics on groups of variables, including summary {stats}, describe {Hmisc}, and describe {psych}, but none that I have found is able to provided weighted descriptives of subsets of a data set (ex. descriptives for both males and females for age, where accurate results require use of sampling
2010 Oct 19
2
superpose.polygon, panel.polygon and their colors
Dear R-helpers, the problem I'm facing today is to convince lattice to paint some areas in gray. The areas I would like to have in gray, are confidence bands I've googled around in the mailing list archives and eventually find some clues. This link is my starting point http://tolstoy.newcastle.edu.au/R/e2/help/07/04/15595.html I'm reproducing here the code for your convenience est
2012 Jan 30
1
about changing line type and line width in Taylor Diagram
Dear all, I am new to plotting Taylor Diagram using plotrix package within R, hence this post. I have written a script which plots Taylor Diagram with one reference and 7 model values. However the font size, line width and line type are not clear when saving the diagram as a jpeg file. I tried the functions lty, lwd and font but no apparent change. I am attaching the script here. Any help would
2012 Mar 14
10
permission denied errors on /var/lib/puppet stuff during puppetd -t
I''m suddenly getting the below errors from Rack during puppetd -t (excerpted from the pink HTML output and cleaned for readability): Could not prepare for execution: Got 10 failure(s) while initializing: change from absent to directory failed: Could not set ''directory on ensure: Permission denied - /var/lib/puppet/yaml; change from absent to directory failed: Could not set
2009 Nov 09
1
How to change color the default in levelplot() ?
Dear R communities May I seek your advices on how to change color the default in levelplot(), e.g. from the default of pink and light blue, to e.g. red and green ? The levelplot function has 1 of the arguments being panel (which is actually panel.levelplot), but I am not sure where the commands to alter the color. For example, I type: p1<-levelplot(my.mat,colorkey=FALSE), how could I