Wednesday, 29 November 2017
Resources to open Word documents in R...
Extracting data from a docx file:
https://cran.r-project.org/web/packages/docxtractr/docxtractr.pdf
https://www.r-bloggers.com/new-pacakge-docxtractr-easily-extract-tables-from-microsoft-word-docs/
https://rud.is/b/2015/08/24/new-pacakge-docxtractr-easily-extract-tables-from-microsoft-word-docs/
Extracting data from a doc file:
https://cran.r-project.org/web/packages/textreadr/textreadr.pdf
Splitting a character vector into a data frame...
https://stackoverflow.com/questions/22455884/how-to-split-a-character-vector-into-data-frame
Rowbind when different numbers of columns...
https://stackoverflow.com/questions/3402371/combine-two-data-frames-by-rows-rbind-when-they-have-different-sets-of-columns
Thursday, 9 November 2017
Some information regarding the ~ symbol...
Some information regarding the ~ symbol...
Some points:
- The symbol ~ is called tilde so searching with the word is useful.
- It's use in v~Vmax*S/(Km+S) is to create the non-linear formula.
- It's special R syntax rather than general bioinformatics syntax.
- It's specific meaning in this context is to create a formula object in R which can be used later.
- The ~ symbol (tilde) separates one side of the formula from the other.
- The symbol means that R doesn't try to evaluate the formula but creates an object - sometimes a "formula" object
By way of an example, here is some R code:
my_formula <- y ~ bot+(top-bot)/(1+( x / LD50)^slope)
class(my_formula)
The object in this case is my_formula and the class of the object is "formula". The tilda sets y on the left hand side and x, bot, top, LD50 and slope on the right hand side.
That's enough for a start but questions are welcome.
Some resources:
- This repeats much of what I have said and is the source of some of my knowledge: https://stackoverflow.com/questions/14976331/use-of-tilde-in-r-programming-language
- This is a more detailed comment on what the tilde does in a variety of situations. It's quite detailed R written by one of the senior developers in the field. https://cran.r-project.org/web/packages/lazyeval/vignettes/lazyeval.html
END of info for now...
Subscribe to:
Posts (Atom)