Difference between revisions of "RPR-OBJECTS-Lists"

From "A B C"
Jump to navigation Jump to search
m (Created page with "<div id="BIO"> <div class="b1"> R "Lists" </div> {{Vspace}} <div class="keywords"> <b>Keywords:</b>  Lists </div> {{Vspace}} __TOC__ {{Vspace}} {{DEV}} {...")
 
m
Line 27: Line 27:
 
<div id="ABC-unit-framework">
 
<div id="ABC-unit-framework">
 
== Abstract ==
 
== Abstract ==
 +
<section begin=abstract />
 
<!-- included from "../components/RPR-Objects-Lists.components.wtxt", section: "abstract" -->
 
<!-- included from "../components/RPR-Objects-Lists.components.wtxt", section: "abstract" -->
 
...
 
...
 +
<section end=abstract />
  
 
{{Vspace}}
 
{{Vspace}}
Line 62: Line 64:
 
*<b>Time management</b>: Before you begin, estimate how long it will take you to complete this unit. Then, record in your course journal: the number of hours you estimated, the number of hours you worked on the unit, and the amount of time that passed between start and completion of this unit.
 
*<b>Time management</b>: Before you begin, estimate how long it will take you to complete this unit. Then, record in your course journal: the number of hours you estimated, the number of hours you worked on the unit, and the amount of time that passed between start and completion of this unit.
 
<!-- included from "ABC-unit_components.wtxt", section: "deliverables-journal" -->
 
<!-- included from "ABC-unit_components.wtxt", section: "deliverables-journal" -->
*<b>Journal</b>: Document your progress in your [[FND-Journal|course journal]].
+
*<b>Journal</b>: Document your progress in your [[FND-Journal|Course Journal]]. Some tasks may ask you to include specific items in your journal. Don't overlook these.
 
<!-- included from "ABC-unit_components.wtxt", section: "deliverables-insights" -->
 
<!-- included from "ABC-unit_components.wtxt", section: "deliverables-insights" -->
*<b>Insights</b>: If you find something particularly noteworthy about this unit, make a note in your [[ABC-Insights|insights! page]].
+
*<b>Insights</b>: If you find something particularly noteworthy about this unit, make a note in your [[ABC-Insights|'''insights!''' page]].
  
 
{{Vspace}}
 
{{Vspace}}

Revision as of 17:33, 7 September 2017

R "Lists"


 

Keywords:  Lists


 



 


Caution!

This unit is under development. There is some contents here but it is incomplete and/or may change significantly: links may lead to nowhere, the contents is likely going to be rearranged, and objectives, deliverables etc. may be incomplete or missing. Do not work with this material until it is updated to "live" status.


 


Abstract

...


 


This unit ...

Prerequisites

You need to complete the following units before beginning this one:


 


Objectives

...


 


Outcomes

...


 


Deliverables

  • Time management: Before you begin, estimate how long it will take you to complete this unit. Then, record in your course journal: the number of hours you estimated, the number of hours you worked on the unit, and the amount of time that passed between start and completion of this unit.
  • Journal: Document your progress in your Course Journal. Some tasks may ask you to include specific items in your journal. Don't overlook these.
  • Insights: If you find something particularly noteworthy about this unit, make a note in your insights! page.


 


Evaluation

Evaluation: NA

This unit is not evaluated for course marks.


 


Contents

Lists

The elements of matrices and arrays all have to be of the same type. Data frames allow us to store elements of different types in columns but all columns have to have the same length. But lists are more generally ordered collections of components. These components can have different type, AND different size.

Lists are created with the list() function, which works similar to the c() function. Components are accessed through their index in double square brackets, or through their name, using the "$" operator, if the name has been defined. Here is an example:

pUC19 <- list(size=2686, marker="ampicillin", ori="ColE1", accession="L01397", BanI=c(235, 408, 550, 1647) )
pUC19[[1]]
pUC19[[2]]
pUC19$ori
pUC19$BanI[2]

Note that in the data frame, multiple restriction enzymes were stored in one string, separated by commas. While we can take data like this apart with the strsplit() function, it is still just one element in the data frame's column.


 


 


Further reading, links and resources

 


Notes


 


Self-evaluation

 



 




 

If in doubt, ask! If anything about this learning unit is not clear to you, do not proceed blindly but ask for clarification. Post your question on the course mailing list: others are likely to have similar problems. Or send an email to your instructor.



 

About ...
 
Author:

Boris Steipe <boris.steipe@utoronto.ca>

Created:

2017-08-05

Modified:

2017-08-05

Version:

0.1

Version history:

  • 0.1 First stub

CreativeCommonsBy.png This copyrighted material is licensed under a Creative Commons Attribution 4.0 International License. Follow the link to learn more.