Message Boards Message Boards

0
|
5301 Views
|
3 Replies
|
0 Total Likes
View groups...
Share
Share this post:
GROUPS:

Imported data from Excel does not give expected result

Posted 10 years ago

I am learning a bit of Mathematica from the book of Paul Wellin “Prog with Math”. In Chapter 5 he makes a nice example of a ‘VertexGraph’and he uses imported proteine strings data from a Wolfram Server. I had the idea to use this for a similar experiment with my Facebook friends. I made a data sheet in Excel and imported it in Mathematica. After some cleaning up I had seemingly the same format as Wellin. But trying to graph the data resulted in an error message “Graph::supp: Mixed graphs and multigraphs are not supported. ? “

When I made a simple example with some tekst (without quotes) by hand the it works fine ? What could be the problem ? I have a suspicion that the imported data has somewhere quotes left.

Thank you fo your time Chiel Geeraert

Attachments:
POSTED BY: Chiel Geeraert
3 Replies

Beste Chiel, You have duplicate edges in your set. I used:

data3 = DirectedEdge[#[[1]], #[[2]]] & /@ data2 // DeleteDuplicates

Then for fun:

CommunityGraphPlot[data3]

enter image description here

I hope this helps,

Lou

POSTED BY: l van Veen
Posted 10 years ago

Hartelijk dank voor uw reactie. Ik had het probleem zelf ook gevonden , maar ik ben nog niet zo ervaren in Mathematica dus ik had alle dubbele met de hand opgespoord en eruit gegooid. Daar ben ik wel even mee bezig geweest ! Uw oplossing is fraai gevonden en ik ben er bijzonder blij mee.

Met vriendelijke groet, Chiel Geeraert

POSTED BY: Chiel Geeraert

Beste Chiel, You're welcome! In amsterdam and Antwerpen there are some very good free training sessions on learning to program with mathematica. You can check the website from candiensten in NL. That is if you're located in NL or BE. Have fun! met vriendelijke groet, lou

POSTED BY: l van Veen
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract