Usage Arguments Note Author(s) Examples
View source: R/customized functions.R
1 | cufu_textcoord(A_ca, B_ca)
|
A_ca |
output of the performance of correspondence analysis on word matrix A 'A_ca = ca(d_A)' |
B_ca |
output of the performance of correspondence analysis on word matrix B 'B_ca = ca(d_B)' |
This package is built to simplify the code in the final report of Methods of Corpus Linguistics
Christine Zhao
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | ## The function is currently defined as
function(A_ca, B_ca){
text_coord_A <- row_pcoord(A_ca) # coordinates of texts
text_coord_B <- row_pcoord(B_ca)
A_texts_df <- tibble(
text = A_short_fnames,
sub_corp = 'First Decade',
x = text_coord_A[, 1],
y = text_coord_A[, 2])
B_texts_df <- tibble(
text = B_short_fnames,
sub_corp = 'Second Decade',
x = text_coord_B[, 1],
y = text_coord_B[, 2])
texts_df <- rbind(A_texts_df, B_texts_df)
return(texts_df)
}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.