Description Usage Arguments Details Value Examples
View source: R/get_mds_article_fits.R
Multidimensional scaling for article similarity
1 2 | get_mds_article_fits(num_articles, num_clusters, year_range, input_df,
a_vectors = article_vectors)
|
num_articles |
integer, number of articles to select from entire dataframe |
num_clusters |
integer, number of clusters to generate |
year_range |
vector, c(1947,1948) containing beginning to end year |
input_df |
dataframe an articles dataframe containing article info and Similarity info (e.g., like the one generated by |
a_vectors |
matrix, containing the article vectors (e.g., |
columns are:
formatted_column
for printing abstract info HTML
title
abstract title
wrap_title
useful for plotly hover labels
year
abstract year
index
abstract index
Similarity
of search term to abstract
X
x coordinate from MDS
Y
y coodinate from MDS
cluster
from k-means clustering
dataframe, a modified version of input_df
containing MDS coordinates and cluster information useful for plotting
1 2 3 | search <- c("president")
article_dataframe<-get_search_article_similarities(search,query_type=1)
MDS <- get_mds_article_fits(10,2,c(1947,1948),article_dataframe)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.