ancestry | R Documentation |
Starting from the given node, doctoral advisors are followed recursively for the specified number of steps. In case no advisor is known, the algorithm stops even if the number of steps is not yet reached. Loops in the academic tree (thicket??) are problematic - e.g. if a person was advised by two advisors, and one of them was an advisor to the other (advised by both academic brother and father). This results in duplicate entries. Each call to ancestry results in multiple requests to the Mathematics Genealogy Project, so use responsibly.
ancestry(id, steps, verbose = FALSE, includeself = TRUE)
id |
identifier given to a mathematician in the Mathematics Genealogy Project. |
steps |
integer number of number of steps to follow from the root |
verbose |
Boolean - should results be reported during the scraping? defaults to FALSE. |
includeself |
include information on the starting id into the output? defaults to TRUE |
data frame with the following variables
Name name of the mathematician
mgID Math Gen ID
School university granting the degree
Thesistitle
Degree
Year
advisorName
advisorMGID Math Gen ID of the advisor(s)
## Not run: hw <- ancestry(id = 145799, steps = 4) # Hadley Wickham ancestry(id = 145799, steps = 2, siblings = TRUE) # Hadley Wickham dh <- ancestry(id=7298, steps = 5) # David Hilbert library(ggplot2) library(geomnet) hw <- plyr::rbind.fill(data.frame(advisorMGID=145799, advisorName="Hadley Alexander Wickham"), hw) ggplot() + geom_net(aes(from_id=factor(advisorMGID), to_id=factor(mgID), label=advisorName), directed=TRUE, data=hw) + theme_net() + xlim(c(-0.1, 1.1)) qplot(y = rep(1:10, length=nrow(dh)), x=as.numeric(as.character(Year)), label = Name, data=dh, geom="label", alpha = I(0.5)) ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.