First install ripser.
Then make it locatable on your system PATH, something like:
$ ln -s /home/clark/dev/ripser/ripser /usr/local/bin/ripser
After this your system should be able to find ripser:
$ which ripser
| # Checking to see how this saves. What will it look like? | |
| # Not sure | |
| x <- 1:10 |
| # Clark 9/27/13 | |
| # | |
| # This script graphs the conversion rate data | |
| # You'll need to change the file.path parameter to the location of your data. | |
| file.path <- "/home/shared/barug_oct13/hourly_rate.csv" | |
| require(ggplot2) | |
| require(grid) |
| # Clark Fitzgerald 23 Sep 13 | |
| # | |
| # This script gets current exchange rates and writes to csv file. | |
| csv.path <- "/home/shared/barug_oct13/hourly_rate.csv" | |
| library("XML") | |
| # We'll compare the conversion rate from US to South Korea. | |
| country <- "korea" |
| > library(ddR) | |
| Welcome to 'ddR' (Distributed Data-structures in R)! | |
| For more information, visit: https://github.com/vertica/ddR | |
| Attaching package: ‘ddR’ | |
| The following objects are masked from ‘package:base’: | |
| cbind, rbind |
| # Mon Jul 18 08:08:09 PDT 2016 | |
| # Goal: Store arbitrary objects in DataFrames as bytes to make dapply more | |
| # general | |
| # | |
| # Inefficient- this uses CLOB rather than BLOB | |
| # Comments throughout this question are helpful | |
| # http://stackoverflow.com/questions/5950084/how-to-handle-binary-strings-in-r | |
| library(SparkR) |
| # A very simple parallel program | |
| # | |
| # We specify the probability that each individual | |
| # votes for a candidate, and then simulate the counts | |
| # for n such voters. | |
| # | |
| # count_votes and count_votes_slow are the functions | |
| # to parallelize. Typically each run will take some | |
| # time to complete. | |
| # |
First install ripser.
Then make it locatable on your system PATH, something like:
$ ln -s /home/clark/dev/ripser/ripser /usr/local/bin/ripser
After this your system should be able to find ripser:
$ which ripser
| x = 1:3 | |
| y = 11:13 | |
| # Given vectors x, y, what's the cleanest general way to make z? | |
| # z = c(1, 11, 2, 12, 3, 13) | |
| shuffle = function(x, y) | |
| { | |
| as.vector(mapply(c, x, y)) | |
| } |
| """ | |
| http://stackoverflow.com/questions/41886507/data-table-faster-row-wise-recursive-update-within-group/41891693#41891693 | |
| require(data.table) # v1.10.0 | |
| n_smpl = 1e6 | |
| ni = 5 | |
| id = rep(1:n_smpl, each = ni) | |
| smpl = data.table(id) | |
| smpl[, time := 1:.N, by = id] | |
| a_init = 1; b_init = 1 |