Editing the plots/visualization on a timeline.

0 votes

I have a 1000*10 matrix showing cashflow of 10 years. For analytical purposes I want to examine the different percentiles/quantiles in terms of a variable

Part of my R-code

plot(timeline, TOTKS[1,], ylim=range(-15000000,100000000), type="l", ylab="Cash Flow", xlab="year")
for (i in 1:total.simulations){
lines(timeline, TOTKS[i,])}

I want to color the 10 % lowest cash flows in the plot above.

Nov 16, 2018 in Data Analytics by Ali
• 10,410 points

1 answer to this question.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
0 votes

find the ten lowest total cash flows. Add up the columns:

total.cashflow <- drop(colSums(TOTKS, na.rm=TRUE))

Then find which are the 10% lowest:

rank.cashflow.le10 <- which(
    total.cashflow <= qualtile(total.cashflow, 0.1)

Add them to the plot:

matlines(timeline, TOTKS[,rank.cashflow.le10], col="red")

To examine those as a separate matrix (but you might not need to, with a vector of indicies)

low10TOTKS <- TOTKS[,rank.cashflow.le10]

answered Nov 16, 2018 by Maverick
• 10,020 points

Related Questions In Data Analytics

0 votes
1 answer

Save a plot as image on the disk using R

Consider for both the situations: 1. Image will ...READ MORE

answered Apr 13, 2018 in Data Analytics by darklord
• 6,140 points
0 votes
1 answer
0 votes
1 answer

Plotting multiple graphs on the same page in R

If you want to plot 4 graphs ...READ MORE

answered Mar 27, 2018 in Data Analytics by Bharani
• 4,550 points
0 votes
1 answer

How to change the value of a variable using R programming in a data frame?

Try this: df$symbol <- as.character(df$symbol) df$symbol[df$symb ...READ MORE

answered Jan 11 in Data Analytics by Tyrion anex
• 8,280 points
0 votes
1 answer

Parallel programming In R using GPU

Check out the CRAN Task View on High-Performance ...READ MORE

answered Feb 4 in Data Analytics by Tyrion anex
• 8,280 points
0 votes
1 answer

R programming: Naming the output file using a variable

Use the paste command: write.csv(max.hsi, paste0("Index_", i,".csv" ...READ MORE

answered Mar 25 in Data Analytics by Sophie may
• 9,330 points
0 votes
1 answer
0 votes
1 answer
0 votes
1 answer

© 2018 Brain4ce Education Solutions Pvt. Ltd. All rights Reserved.
"PMP®","PMI®", "PMI-ACP®" and "PMBOK®" are registered marks of the Project Management Institute, Inc. MongoDB®, Mongo and the leaf logo are the registered trademarks of MongoDB, Inc.