Displaying 20 results from an estimated 600 matches similar to: "superimpose graphs"
2011 Apr 16
1
600 people's time series
Hi there,
I have a data frame DF of over 600 people's short term trade data in time
order. Below is the super simplified structure of the data.
id invest payout
[1] 1 10 -1
[2] 1 33 33
[3] 1 20 -5
[4] 2 200 33
[5] 2 33 -20
[6] 3 5 -5
[7] 3
2006 Oct 25
2
Isn''t it possible to stub / expect on :id ?
Hi all !
Running this:
@payout = stub_everything(:id => 141)
Payout.stubs(:find).with(@payout.id).returns(@payout)
Generates this warning:
./test/functional/payouts_controller_test.rb:22: warning: Object#id
will be deprecated; use Object#object_id
What am I missing ? :id is a fairly frequent method to override in
Rails-based applications.
I''m using Mocha from
2007 Apr 26
3
A coding question involving variable assignments in ifelse()
Dear List,
Below is a simple, standard loss model that takes into account the
terms of an insurance policy:
deductible <- 15
coverage.limit <- 75
insurance.threshold <- deductible + coverage.limit
tmpf <- function() {
loss <- rlnorm(rpois(1, 3), 2, 5)
sum(ifelse(loss > insurance.threshold, loss - coverage.limit,
pmin(loss, deductible)))
}
net <- replicate(1000000, tmpf())
2008 Dec 04
2
Ruby fun with MegaMillions
I thought I would write a lottery number generator since I have not had any
luck winning the big jackpot - http://megamillions.com/. So far, after over
1.2 million tries, I still have not hit all the numbers from yesterday: 2,
17, 22, 32, 51, 35 (last one is the mega ball).
Fun little project that and I thought others would be interested. Let me
know if you have a cleaner implementation in mind.
2012 Jan 13
1
Portfolio Optimization
Hi,
I'm an R newbie and I've been struggling with a optimization problem for
the past couple of days now.
Here's the problem - I have a matrix of expected payouts from different
stock option strategies. Each column in my matrix represents a different
stock and each row represents the return to the strategy given a certain
market move. So the rows are not a time series of percentage
2011 May 31
1
while loop problems
Hi , i am trying to get this loop in my r program to work but it is
not giving me the results that I desire. I am trying to model an
insurance contract where there are n securities that have a fixed
likelihood of default vector(data[i,2]) and a payout
vector(data[i,1]).
i need to price the value of stop losses at the security level and at
the portfolio level. to do this i created two while loops
2009 Apr 27
1
Extract one element from yahooKeystats data
I am trying to extract one particular piece of data(Float) from all
the data returned by yahooKeystats, but thus far I'm having no luck.
This is what I've got so far:
> library(fImport)
Loading required package: timeSeries
Loading required package: timeDate
> data<-yahooKeystats("IBM")
trying URL 'http://finance.yahoo.com/q/ks?s=IBM'
Content type 'text/html;
2019 Feb 24
2
SAMBA DNS interfaces set to br0
On a machine with virtual networking is enabled and two ether net
controllers eth0/192.168.1.2 and eth1/192.168.1.3 and having SAMBA smb.conf
set to:
dns interfaces = lo br0
is there a chance for:
1) The system not to boot with DNS working
2) The DNS server bounce between eth0 and eth1
3) The DNS server portion work on boot sometimes on eth0, but when software
restarted only work on eth1 or
2008 Apr 01
1
superimpose histogram on biplot
Hi all,
I've been trying to figure out how to superimpose a histogram on a
biplot that shows the relative contribution of each axis. I have
been using the NIPALS function (http://biomserv.univ-lyon1.fr/~dray/
files/softwares/nipals.R) to run principal component analyses. Here
is a toy example.
source("http://biomserv.univ-lyon1.fr/~dray/files/softwares/nipals.R")
2011 Nov 28
1
Superimpose two graphs
Dear R users,
I want to superimpose two graphs as well as ensure that they should have
same scale with same x & y axis.
I am using following command but it does not ensure same scale.
*pdf(file = "../RESULTS/RS1.simulated.pdf", width = 10, height =6)*
*plot(Reserves.RS, col = 1:2, screen = 1)*
*par(new= TRUE)*
*barplot(RS.active, axes = FALSE)*
*dev.off()*
*
*
Regards
Vikram
2005 Nov 29
1
Superimpose Histograms
Hi all,
I have data which is represented as a histogram and want to add more
data / another histogram to this plot using another color. That is I
need to superimpose multiple histograms.
But have no idea how to do this.
Can anybody please give me a hint?
Thanks,
Andreas
--
Andreas Wilm
Institut fuer Physikalische Biologie
Heinrich-Heine-Universitaet Duesseldorf
2009 Jul 02
1
superimpose multiple scatterplot matrices
Dear R- experts,
I am trying to superimpose two or more scatterplot matrices generated by pairs() to visualize the differences over each datasets, but have not been very successful. Two data frames, df1 and df2 for example, each has the same five variables in columns.
My goal is to paint each dataset with a color on the same plot panel for each pair of the five variables.
That is, in this
2010 Jan 21
1
superimpose histogram and fitted gamma pdf
Hi r-users,
I try to draw histogram (in terms of probabilty) and superimpose with the gamma pdf. Using this code below I can get the plots BUT the y scale for the density is out of scale. How do I change the y-axis scale to max 1? Another thing, how I do draw smooth line rather that points?
Nota that my observed data is hume_pos and the fitted data is rgam1.
hist(hume_pos,prob=TRUE)
1999 Jun 07
0
How to superimpose a histogram and density plot
NCSS has a nice plot of the histogram and density plot superimposed. The
S-PLUS 4 Guide to Statistics on page 45 suggests the following code for a
general purpose density plot for a vector named data
iqd <- summary(data)[5]-summary(data)[2]
plot(density(data,width=2*iqd),xlab="x",ylab="",type="l")
Is it possible to superimpose the density plot on a histogram
2010 Sep 15
2
how to superimpose 2 matrices of different sizes
Hi All,
I?m trying to superimpose (or "add") two matrices:
1. resulting from a table function with frequencies:
> U=table(pop$xloc, pop$yloc))
14 15 16 17 18 19 20 21 22
5 0 0 0 0 0 0 0 0 0
7 0 0 0 0 0 0 0 0 0
8 0 0 0 0 0 0 0 0 0
9 0 0 0 0 0 0 9 0 5
10 0 0 0 0 0 0 0 0 0
11 0 0 0 0 0 0 0 0 0
2.
2012 Dec 02
0
superimpose density line over hist
>>>>> "Romain" == Romain Francois <[hidden email]>
>>>>> on Tue, 13 Dec 2005 15:40:59 +0100 writes:
........
Romain> A few comments :
Romain> - your code should be reproductible, otherwise it is useless.
(that
Romain> recommandation is on the posting guide)
Romain> - that question is a top ten question
2011 Nov 01
1
Superimpose xversus y plot on a histogram of x
I need a plot with a histogram z and a plot of z versus y superimposed.
This is not working...
z = rnorm(1000)
y = rnorm(1000,1,2)
hist(z)
dx = plot(z, y, lwd = 1)
lines(dx, add=TRUE)
--
Thanks,
Jim.
[[alternative HTML version deleted]]
2009 Sep 02
1
Howto Superimpose Multiple Density Curves Into One Plot
I have a data that looks like this:
http://dpaste.com/88561/plain/
And I intend to create multiple density curve into one plot, where each curve
correspond to the unique ID.
I tried to use "sm" package, with this code, but without success.
__BEGIN__
library(sm)
dat <- read.table("mydat.txt");
plotfn <- ("~/Desktop/flowgram_superimposed.pdf");
pdf(plotfn);
2008 Jul 05
3
trying to superimpose a line plot onto a histogram
Hello,
I'm trying to superimpose a line plot onto a histogram but I'm not having
any luck. I've attached the dataset. What I did was:
> hist(data,freq=F)
Now I'm trying to superimpose the following points with a line connecting
them onto the histogram:
x y
100 0.535665393824959
200 0.212744329736556
300 0.0844933242968584
400 0.0335572838043417
500
2010 Feb 09
1
Superimpose ksmooth() onto barplot
I'd like to superimpose a ksmooth() onto a barplot().
My data is:
> d
2009-06-20 2009-06-21 2009-06-22 2009-06-23 2009-06-24
2009-06-25 2009-06-26 2009-06-27 2009-06-28 2009-06-29 2009-06-30
2009-07-01 2009-07-02
Same Breed (B) 12.64 21.08 13.52 12.51
13.71 9.91 14.24 7.18 11.81 5.92
12.04 17.96