Skip to contents

Extracts the names of nodes (vertices) from a network object. This is for internal use for network types in the JaB package

Usage

get_nodes(network)

Arguments

network

A network object with \(n\) nodes. Network can be represented as a matrix, dgCMatrix edgelist, or igraph). See make_network_type for details.

Value

A vector of node names. If node names are not assigned, it returns a sequence of integers from 1 to \(n\).

Examples

data(paul.revere)
get_nodes(paul.revere)
#>   [1] "Adams.John"            "Adams.Samuel"          "Allen.Dr"             
#>   [4] "Appleton.Nathaniel"    "Ash.Gilbert"           "Austin.Benjamin"      
#>   [7] "Austin.Samuel"         "Avery.John"            "Baldwin.Cyrus"        
#>  [10] "Ballard.John"          "Barber.Nathaniel"      "Barnard.Samuel"       
#>  [13] "Barrett.Samuel"        "Bass.Henry"            "Bell.William"         
#>  [16] "Blake.Increase"        "Boit.John"             "Bolter.Thomas"        
#>  [19] "Boyer.Peter"           "Boynton.Richard"       "Brackett.Jos"         
#>  [22] "Bradford.John"         "Bradlee.David"         "Bradlee.Josiah"       
#>  [25] "Bradlee.Nathaniel"     "Bradlee.Thomas"        "Bray.George"          
#>  [28] "Breck.William"         "Bewer.James"           "Brimmer.Herman"       
#>  [31] "Brimmer.Martin"        "Broomfield.Henry"      "Brown.Hugh"           
#>  [34] "Brown.Enoch"           "Brown.John"            "Bruce.Stephen"        
#>  [37] "Burbeck.Edward"        "Burbeck.William"       "Burt.Benjamin"        
#>  [40] "Burton.Benjamin"       "Cailleteau.Edward"     "Callendar.Elisha"     
#>  [43] "Campbell.Nicholas"     "Cazneau.Capt"          "Chadwell.Mr"          
#>  [46] "Champney.Caleb"        "Chase.Thomas"          "Cheever.Ezekiel"      
#>  [49] "Chipman.Seth"          "Chrysty.Thomas"        "Church.Benjamin"      
#>  [52] "Clarke.Benjamin"       "Cleverly.Stephen"      "Cochran.John"         
#>  [55] "Colesworthy.Gilbert"   "Collier.Gershom"       "Collins.Ezra"         
#>  [58] "Collson.Adam"          "Condy.JamesFoster"     "Cooper.Samuel"        
#>  [61] "Cooper.William"        "Crafts.Thomas"         "Crane.John"           
#>  [64] "Davis.Caleb"           "Davis.Edward"          "Davis.Robert"         
#>  [67] "Davis.William"         "Dawes.Thomas"          "Dennie.William"       
#>  [70] "Deshon.Moses"          "Dexter.Samuel"         "Dolbear.Edward"       
#>  [73] "Doyle.Peter"           "Eaton.Joseph"          "Eayres.Joseph"        
#>  [76] "Eckley.Unknown"        "Edes.Benjamin"         "Emmes.Samuel"         
#>  [79] "Etheridge.William"     "Fenno.Samuel"          "Ferrell.Ambrose"      
#>  [82] "Field.Joseph"          "Flagg.Josiah"          "Fleet.Thomas"         
#>  [85] "Foster.Bos"            "Foster.Samuel"         "Frothingham.Nathaniel"
#>  [88] "Gammell.John"          "Gill.Moses"            "Gore.Samuel"          
#>  [91] "Gould.William"         "Graham.James"          "Grant.Moses"          
#>  [94] "Gray.Wait"             "Greene.Nathaniel"      "Greenleaf.Joseph"     
#>  [97] "Greenleaf.William"     "Greenough.Newn"        "Ham.William"          
#> [100] "Hammond.Samuel"        "Hancock.Eben"          "Hancock.John"         
#> [103] "Hendley.William"       "Hewes.George"          "Hickling.William"     
#> [106] "Hicks.John"            "Hill.Alexander"        "Hitchborn.Nathaniel"  
#> [109] "Hitchborn.Thomas"      "Hobbs.Samuel"          "Hoffins.John"         
#> [112] "Holmes.Nathaniel"      "Hooton.John"           "Hopkins.Caleb"        
#> [115] "Hoskins.William"       "Howard.Samuel"         "Howe.Edward"          
#> [118] "Hunnewell.Jonathan"    "Hunnewell.Richard"     "Hunstable.Thomas"     
#> [121] "Hunt.Abraham"          "Ingersoll.Daniel"      "Inglish.Alexander"    
#> [124] "Isaac.Pierce"          "Ivers.James"           "Jarvis.Edward"        
#> [127] "Jarvis.Charles"        "Jefferds.Unknown"      "Jenkins.John"         
#> [130] "Johnston.Eben"         "Johonnott.Gabriel"     "Kent.Benjamin"        
#> [133] "Kerr.Walter"           "Kimball.Thomas"        "Kinnison.David"       
#> [136] "Lambert.John"          "Lee.Joseph"            "Lewis.Phillip"        
#> [139] "Lincoln.Amos"          "Loring.Matthew"        "Lowell.John"          
#> [142] "Machin.Thomas"         "Mackay.William"        "MacKintosh.Capt"      
#> [145] "MacNeil.Archibald"     "Marett.Phillip"        "Marlton.John"         
#> [148] "Marshall.Thomas"       "Marson.John"           "Mason.Jonathan"       
#> [151] "Matchett.John"         "May.John"              "McAlpine.William"     
#> [154] "Melville.Thomas"       "Merrit.John"           "Milliken.Thomas"      
#> [157] "Molineux.William"      "Moody.Samuel"          "Moore.Thomas"         
#> [160] "Morse.Anthony"         "Morton.Perez"          "Mountford.Joseph"     
#> [163] "Newell.Eliphelet"      "Nicholls.Unknown"      "Noyces.Nat"           
#> [166] "Obear.Israel"          "Otis.James"            "Palfrey.William"      
#> [169] "Palmer.Joseph"         "Palms.Richard"         "Parker.Jonathan"      
#> [172] "Parkman.Elias"         "Partridge.Sam"         "Payson.Joseph"        
#> [175] "Pearce.IsaacJun"       "Pearce.Isaac"          "Peck.Samuel"          
#> [178] "Peck.Thomas"           "Peters.John"           "Phillips.John"        
#> [181] "Phillips.Samuel"       "Phillips.William"      "Pierce.William"       
#> [184] "Pierpont.Robert"       "Pitts.John"            "Pitts.Lendall"        
#> [187] "Pitts.Samuel"          "Porter.Thomas"         "Potter.Edward"        
#> [190] "Powell.William"        "Prentiss.Henry"        "Prince.John"          
#> [193] "Prince.Job"            "Proctor.Edward"        "Pulling.John"         
#> [196] "Pulling.Richard"       "Purkitt.Henry"         "Quincy.Josiah"        
#> [199] "Randall.John"          "Revere.Paul"           "Roby.Joseph"          
#> [202] "Roylson.Thomas"        "Ruddock.Abiel"         "Russell.John"         
#> [205] "Russell.William"       "Sessions.Robert"       "Seward.James"         
#> [208] "Sharp.Gibbens"         "Shed.Joseph"           "Sigourney.John"       
#> [211] "Simpson.Benjamin"      "Slater.Peter"          "Sloper.Ambrose"       
#> [214] "Smith.John"            "Spear.Thomas"          "Sprague.Samuel"       
#> [217] "Spurr.John"            "Stanbridge.Henry"      "Starr.James"          
#> [220] "Stearns.Phineas"       "Stevens.Ebenezer"      "Stoddard.Asa"         
#> [223] "Stoddard.Jonathan"     "Story.Elisha"          "Swan.James"           
#> [226] "Sweetser.John"         "Symmes.Eben"           "Symmes.John"          
#> [229] "Tabor.Philip"          "Tileston.Thomas"       "Trott.George"         
#> [232] "Tyler.Royall"          "Urann.Thomas"          "Vernon.Fortesque"     
#> [235] "Waldo.Benjamin"        "Warren.Joseph"         "Webb.Joseph"          
#> [238] "Webster.Thomas"        "Welles.Henry"          "Wendell.Oliver"       
#> [241] "Wheeler.Josiah"        "White.Samuel"          "Whitten.John"         
#> [244] "Whitwell.Samuel"       "Whitwell.William"      "Williams.Jeremiah"    
#> [247] "Williams.Jonathan"     "Williams.Thomas"       "Willis.Nathaniel"     
#> [250] "Wingfield.William"     "Winslow.John"          "Winthrop.John"        
#> [253] "Wyeth.Joshua"          "Young.Thomas"