How to run MOnte carlo for each user(10 times) each having different return rate and std dev?
I am trying to use R Studio for this User 1 Initial amount : 10000 Rate : 6% Std deviation : 1
User 2
Intial amount : 12000 Rate : 4% Std deviation : 1 . . . . . . . and so on
See also questions close to this topic

Interval Banding
I am doing a project where I have to create Interval bands/bins but using a couple of conditions. Cut would have worked really well for me if my intervals were just based on each row's data.
This is what my data frame looks like this 
Individual Work Experience Base Salary/Hike
A 1 £40000
B 3 £45000
A 4 £15000So A with one year of work experience gets the 40k50k band. But the third row gets banded 50k60k. Any help would be much appreciated , I have completed the intro and intermediate course along with the first data manipulation deplyr course. Just picked up R this weekend, cheers.
Assuming all other employees start with one year of work experience in the data frame.

R add new column depending on values in a range in different columns
I have a data.table with two boolean columns A and B. I'd like to add a new boolean row C that depends on A and B, but I'm having trouble 'looking' in previous and upcomming rows.
I'd like to define C as follows. If there is a row with A=1 and atleast one B=1 in a range of three rows around then I'd like for C to become C=1 on the row where A=1 and C=0 on all the other rows in the range. Else C should be C=B.
In the case that two ranges overlap and both contain a B=1 then C should become C=1 on both rows where A=1 and C=0 on the others. For more clarification:
df < data.table(A=c(0,0,0,1,0,0,0,0,0,0,0,1,1,0,0), B=c(0,1,0,0,0,1,0,1,1,0,0,0,0,0,1)) A B A B C 1: 0 0 # 1: 0 0 0 2: 0 1 # 2: 0 1 0 3: 0 0 # 3: 0 0 0 4: 1 0 # range of three 4: 1 0 1 5: 0 0 # 5: 0 0 0 6: 0 1 # 6: 0 1 0 7: 0 0 # 7: 0 0 0 8: 0 1 8: 0 1 1 # C = B 9: 0 1 # 9: 0 1 0 10: 0 0 ## 10: 0 0 0 11: 0 0 ## 11: 0 0 0 12: 1 0 ## overlapping range of three 12: 1 0 1 13: 1 0 ## 13: 1 0 1 14: 0 0 ## 14: 0 0 0 15: 0 1 ## 15: 0 1 0
How do I go about doing this, I'm kind of clueless on this one.
 xaringan presentation didn't start on shinyserver