Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
Bernd Klaus
stat_methods_bioinf
Commits
e0880027
Commit
e0880027
authored
Apr 13, 2018
by
Bernd Klaus
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed wrong code in the table combination section, changed highlighting to tango
parent
517b7002
Changes
4
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
109 additions
and
54 deletions
+109
-54
data_handling_bioinf.R
data_handling_bioinf.R
+3
-3
data_handling_bioinf.Rmd
data_handling_bioinf.Rmd
+4
-7
data_handling_bioinf.html
data_handling_bioinf.html
+102
-44
data_handling_bioinf.pdf
data_handling_bioinf.pdf
+0
-0
No files found.
data_handling_bioinf.R
View file @
e0880027
...
@@ -276,9 +276,9 @@ head(q_pcr, 5)
...
@@ -276,9 +276,9 @@ head(q_pcr, 5)
## ----add_rep_info--------------------------------------------------------
## ----add_rep_info--------------------------------------------------------
q_pcr
<-
q_pcr
%>%
q_pcr
<-
q_pcr
%>%
group_by
(
sample_name
)
%>%
group_by
(
sample_name
,
target_Name
)
%>%
{
.
$
replicate
=
c
(
"r_1"
,
"r_2"
)
mutate
(
replicate
=
c
(
"r_1"
,
"r_2"
)
)
%>%
.
}
%>%
ungroup
ungroup
()
head
(
q_pcr
)
head
(
q_pcr
)
...
...
data_handling_bioinf.Rmd
View file @
e0880027
...
@@ -933,18 +933,15 @@ head(q_pcr, 5)
...
@@ -933,18 +933,15 @@ head(q_pcr, 5)
## Adding columns group--wise
## Adding columns group--wise
As we have two replicates per sample, it is a natural to
As we have two replicates per sample, it is a natural to
add this annotation information to the table. Note that
add this annotation information to the table. In the code below, we
we can actually perform complex operations in a single chaining
step by simply wrapping the code in curly brackets. Here, the
dot * . * refers to the current data. In the code below, we
add a column *replicate* to each subgroup of the data frame
add a column *replicate* to each subgroup of the data frame
and the return the augmented data table.
and the return the augmented data table.
```{r add_rep_info}
```{r add_rep_info}
q_pcr <- q_pcr %>%
q_pcr <- q_pcr %>%
group_by(sample_name) %>%
group_by(sample_name
, target_Name
) %>%
{.$
replicate = c("r_1", "r_2")
mutate(
replicate = c("r_1", "r_2")
) %>%
.} %>%
ungroup
ungroup
()
head(q_pcr)
head(q_pcr)
```
```
...
...
data_handling_bioinf.html
View file @
e0880027
This diff is collapsed.
Click to expand it.
data_handling_bioinf.pdf
View file @
e0880027
No preview for this file type
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment