tdm_for_lsa: create Term Document Matrix for lsa analysis

Description Usage Arguments Value Author(s) Examples

Description

lsa package take "Term Document Matrix" as input, so it is needed to create a 'tdm' for Abstracts and tdm_for_lsa do the same as it find out the frequency of given term in each abstract and each abstract is considered as separate document. It prepares term document matrix of terms in the 'abstracts' corpus

Usage

1
tdm_for_lsa(object, y)

Arguments

object

An S4 object of class 'Abstracts'

y

a character vector specifying the terms

Value

a Term Document Matrix (Numerical matrix) containing the raw frequencies of given terms in each abstract.

Author(s)

Jyoti Rani

Examples

1
2
3
## Not run: y = c("insulin", "inflammation", "obesity")
tdm_for_lsa(myabs,y)
## End(Not run)

pubmed.mineR documentation built on Nov. 26, 2021, 5:11 p.m.