addressalign-toparrow-leftarrow-rightbackbellblockcalendarcameraccwcheckchevron-downchevron-leftchevron-rightchevron-small-downchevron-small-leftchevron-small-rightchevron-small-upchevron-upcircle-with-checkcircle-with-crosscircle-with-pluscrossdots-three-verticaleditemptyheartexporteye-with-lineeyefacebookfolderfullheartglobegmailgooglegroupshelp-with-circleimageimagesinstagramlinklocation-pinm-swarmSearchmailmessagesminusmoremuplabelShape 3 + Rectangle 1ShapeoutlookpersonJoin Group on CardStartprice-ribbonShapeShapeShapeShapeImported LayersImported LayersImported Layersshieldstartickettrashtriangle-downtriangle-uptwitteruserwarningyahoo

Bay Area useR Group (R Programming Language) Message Board Bay Area useR Group (R Programming Language) Discussion Forum › Writing functions that affect network attributes... how to return changed?

Writing functions that affect network attributes... how to return changed?

A former member
Post #: 2
First, I'm not using data frames, though maybe I should be. I'm using the network package.

What I've done is written a function which returns a matrix of 3d locations, with 2D representational locations generated from a particular point of perspective.

In order to use my various tools, I would like the _network_ object itself to hold onto this information. So for example, I've generated a matrix with five columns, locations. I can set vertex attributes in the console (using RStudio), but I can't seem to submit a network object to a function and return a network object with the vertex attributes changed.

What this means is that I must permanently have an affiliated matrix in which I keep the locations, and then I can in the console have the network object hold onto those, but I can't have a function assign them to the network object.

In the reverse, I can strip location data from the network vertex attributes, just not vice versa.
Powered by mvnForum

Our Sponsors

People in this
Meetup are also in:

Sign up

Meetup members, Log in

By clicking "Sign up" or "Sign up using Facebook", you confirm that you accept our Terms of Service & Privacy Policy