Usage Arguments Note Author(s) Examples
View source: R/customized functions.R
1 | cufu_wordcoord(A_ca, B_ca, d_A, d_B)
|
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)' |
d_A |
word matrix A 'd_A = cufu_funword(features,A_fnames, A_short_fnames)' |
d_A |
word matrix B 'd_B = cufu_funword(features,B_fnames, B_short_fnames)' |
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 | ## The function is currently defined as
function(A_ca, B_ca, d_A, d_B){
A_word_coord <- col_pcoord(A_ca) # coordinates of function words
B_word_coord <- col_pcoord(B_ca)
A_words_df <- tibble(
word = colnames(d_A),
x = A_word_coord[, 1],
y = A_word_coord[, 2])
B_words_df <- tibble(
word = colnames(d_B),
x = B_word_coord[, 1],
y = B_word_coord[, 2])
words_df <- rbind(A_words_df, B_words_df)
return(words_df)
}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.