ouhscbbmc / statisticalcomputing Goto Github PK
View Code? Open in Web Editor NEWOUHSC's SCUG (Statistical Computing Users Group)
License: MIT License
OUHSC's SCUG (Statistical Computing Users Group)
License: MIT License
@andkov, you may remember @genevamarshall. She's been getting into reports recently and created some neat ones with knitrBootstrap. I'm a little concerned that there hasn't been an real development since spring 2014. Do you know of anything similar that's still being developed? I'd hate for her to invest time into learning it, if it's not going to be maintained. Her preliminary stuff looks great so far.
Here are some links, if that helps jog your memory:
In reference to the example in issue #11:
pax <- c("asdgf2", "asd3", "bcdfs4", "zsdfs5", "asdfs6", "podf-podf-podf-podf-podf")
regex <- "(^\\D\\D\\D\\D)|-\\D\\D\\D\\D|(^\\D+)3"
grep
returns terms that contain matches:> grep(regex, pax, value=T)
[1] "asdgf2" "asd3" "bcdfs4" "zsdfs5"
[5] "asdfs6" "podf-podf-podf-podf-podf"
>
grepl
returns whether the "terms with matches" are TRUE
or FALSE
> grepl(regex, pax)
[1] TRUE TRUE TRUE TRUE TRUE TRUE
>
Thanks again for the review @wibeasley
To @OuhscBbmc/dhswaiverpushpull, @mand9472 and others,
@Maleeha recently asked "is there a possibility that a notification is sent to those who are responsible for the variables whenever they change on REDCap?". For context, we have making some necessary changes to the REDCap database where people are entering live data.
I don't have a good solution for this recurring scenario, and I would appreciate suggestions how we might do it better. I'm affected both as a producer (eg, the main person responsible for the DHS Waiver ferry) and as a consumer (eg, OSDH's ETO). Here are the strategies that we currently (try to) employ:
Make changes to the data source in large, but infrequent batches. I think a slow trickle of changes is harder (for the ~7 analysts on our project) to monitor.
Assign a questionnaire/instrument to as few analysts as possible, and encourage that analysts to feel ownership of that questionnaire and it's maintenance. That also reduces the number of people affected; for example.
If only a few variables are changed, then grep
the variable name and notify the analysts owning the files containing that variable name (eg $ grep -rl "iss_assigned_date" ~/Bbmc/DhsWaiver
).
If broad changes occur, then make a general announcement and request that everyone check their reports against the development version of the database/ferry (eg, the issue called "prospectively check your reports against the v1.1 ferry").
Th recent change affected all most all the important variables (eg, the group assignment), so I assigned it to almost everyone. I didn't assume anyone's reports would be immune.
This transition from the old database to the new database is tough, and we avoid doing it when reports need to be run. I know the proper software engineering strategy is to branch the repo, and eventually merge it into the master after everything's tested. Although I do this for proper R packages, I've been reluctant to branch repos that mainly hold analysis code and reports.
spun off of #177 (cc: @andkov & @aggie-dba)
I want to put comma in currency:
22300
The following regular expression with positive look ahead and negative look ahead, was working on regex 101
(\d)(?=(\d{3})+(?!\d))
You replace it with:
\1,
However its not working for me on R. Any suggestions?
@wibeasley
Thanks!
Create synthetic versions of the C1 TE (time & effort) datasets. Host the complete workflow in https://github.com/wibeasley/RAnalysisSkeleton
You don't have to look at it yet since i have not really spend time on the rest of it on my own but if you do find time to look at it, i am trying to finish the rest of it @wibeasley
Thanks!
I have the following regular expression to capture $
, ,
, .
and digits after period.
^(\$)\d*(,)\d*(.)(\d*)
It is for the following character variable. I am giving one value here:
$34,000.00
I want to get rid of all the captured groups. What do i substitute it with in the following statement.
dplyr::mutate(
income = as.numeric(sub(regex, "", annual_income))
)
@wibeasley ... I am not able to tag anyone else.
Thanks!
Here is the work on Regex101. Please forgive the amateur pattern of regex here:
I want to get it right:
pax <- c("asdgf2", "asd3", "bcdfs4", "zsdfs5", "asdfs6", "podf-podf-podf-podf-podf")
regex <- "(^\\D\\D\\D\\D)|-\\D\\D\\D\\D|(^\\D+)3"
sub(regex, "PF", pax)
gsub(regex, "PF", pax)
sub
:[1] "PFf2" "PF" "PFs4" "PFs5"
[5] "PFs6" "PF-podf-podf-podf-podf"
Bottom-line: sub
scans each cell and look at only the first match to replace it. Does not matter how much of the match was captured. Looks at matched and captured text the same way.
Here is an output with gsub
"PFf2" "PF" "PFs4" "PFs5" "PFs6" "PFPFPFPFPF"
gsub
scans each cell and look at all the matches to replace them and then replace each match with substitution.Thank you for your patience this morning
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.