Skip to Main Content
R Bioinformatics Cookbook
book

R Bioinformatics Cookbook

by Dan MacLean
October 2019
Intermediate to advanced content levelIntermediate to advanced
316 pages
9h 45m
English
Packt Publishing
Content preview from R Bioinformatics Cookbook

How it works...

In Step 1, we loaded the libraries we needed and then prepared the dataframe from the file of edges. The input file is basically an edge list. Each row describes a connection with one of the target nodes in the first column and one in the second. The third column contains a value representing the strength of the interaction between those two nodes, which we'll think of as an edge weight. The fields are separated by a single space and the file has no header with column names. As such, we set the values of the delim and col_names arguments appropriately. We pipe the dataframe to the dplyr::mutate() function to add an extra column called edge_type. In this column, we randomly assign either "A" or "B" to each row using the sample() ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

R Bioinformatics Cookbook - Second Edition

R Bioinformatics Cookbook - Second Edition

Dan MacLean
R Cookbook, 2nd Edition

R Cookbook, 2nd Edition

JD Long, Paul Teetor

Publisher Resources

ISBN: 9781789950694Supplemental Content