Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
datautils
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
bioinfo
datautils
Commits
3d2736c5
Commit
3d2736c5
authored
10 years ago
by
Holger Brandl
Browse files
Options
Downloads
Patches
Plain Diff
cont, new spin wrapper
parent
b83b9ef5
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
R/spinr/README.md
+17
-23
17 additions, 23 deletions
R/spinr/README.md
R/spinr/spin_utils.sh
+4
-1
4 additions, 1 deletion
R/spinr/spin_utils.sh
with
21 additions
and
24 deletions
R/spinr/README.md
+
17
−
23
View file @
3d2736c5
A tiny wrapper around knitr::spin to use it from the terminal
===
To prepare a shell source in the script
source
<
(
curl
https:
//
dl.dropboxusercontent.com
/
u
/113630701/
datautils
/
bash
/
bioinfo_utils.sh
2
>
&1 2>/dev/null)
Installation
---
To use them just source them when needed.
Download it using
```
wget -P ~/bin https://raw.githubusercontent.com/holgerbrandl/datautils/master/R/spinr/spin.R
```
and add it to your PATH if necessary.
Use the issue tracker to suggest changes or to report problems
To prepare a shell just source in the script which will simply define 2 bash functions.
```
source <(curl https://raw.githubusercontent.com/holgerbrandl/datautils/master/R/spinr/spin_utils.sh 2>&1 2>/dev/null)
```
Bash
===
Usage
---
LSF Cluster Utils:
You can spin R scripts with
```
s
ource <(curl https://dl.dropboxusercontent.com/u/113630701/datautils/bash/lsf_utils.sh 2>&1 2>/dev/null)
s
pinr MyScript.R
```
Tools to simplify bio-dataprocessing in bash
or rsnippets with
```
echo "require(ggplot); ggplot(iris, aes(Sepal.Length, Sepal.Width)) + geom_point()" | spinsnip "my_report" "
```
R
===
The R bits are split up into tools for
* general data handling
* plotting using ggplot2
* bioinformatics using various bioconductor packages
```
devtools::source_url("https://dl.dropboxusercontent.com/u/113630701/datautils/R/core_commons.R")
devtools::source_url("https://dl.dropboxusercontent.com/u/113630701/datautils/R/ggplot_commons.R")
devtools::source_url("https://dl.dropboxusercontent.com/u/113630701/datautils/R/bio/bioinfo_commons.R")
devtools::source_url("https://dl.dropboxusercontent.com/u/113630701/datautils/R/datatable_commons.R")
```
This diff is collapsed.
Click to expand it.
R/spinr/spin_utils.sh
+
4
−
1
View file @
3d2736c5
...
...
@@ -2,16 +2,18 @@
spinr
(){
## download if not yet there
if
[
-z
"
$(
which spin.R
)
"
]
;
then
wget
-P
~/
https://
raw.
github
usercontent
.com/holgerbrandl/
themoviedbapi/v1.0/LICENCE.txt
>
&2
echo
"spin.R is not installed. See
https://github.com/holgerbrandl/
datautils/tree/master/R/spinr for details"
fi
~/spin.R
$*
}
export
-f
spinr
spinsnip
(){
if
[
$#
-lt
1
]
;
then
>
&2
echo
"Usage: spinsnip <report name> [other args]*"
>
&2
echo
"The R snippet to be spinned will be read from standard input."
return
fi
...
...
@@ -28,6 +30,7 @@ spinsnip(){
rm
$tmpR
}
export
-f
spinsnip
## usage example
# echo '
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment