[ndnSIM] No output from Rscript.

Alex Afanasyev alexander.afanasyev at ucla.edu
Mon Feb 16 17:15:50 PST 2015


What output are you expecting?

The script is designed to produce "src/ndnSIM/docs/source/_static/root-rates.png” file under the assumption that there is a node named “root”.  From your rate trace I see that you’re using just node IDs.  If so, you need to adjust R script appropriately.

—
Alex

> On Feb 16, 2015, at 12:07 AM, 최원준 <wonjunchoi001 at gmail.com> wrote:
> 
> Hello.
> 
> I created rate-trace.txt like http://pastebin.com/NetBpe7d <http://pastebin.com/NetBpe7d>.
> I used the example from ndnSIM2.0 web.
> but there is no output. I ran the script in terminal.
> 
> Best regards.
> Wonjun, Choi
> 
> # Copyright (c) 2012,2015  Alexander Afanasyev <alexander.afanasyev at ucla.edu <mailto:alexander.afanasyev at ucla.edu>>
> 
> # install.packages('ggplot2')
> library(ggplot2)
> # install.packages('scales')
> library(scales)
> 
> # install.packages('doBy')
> library(doBy)
> 
> #########################
> # Rate trace processing #
> #########################
> data = read.table("rate-trace.txt", header=T)
> data$Node = factor(data$Node)
> data$FaceId <- factor(data$FaceId)
> data$Kilobits <- data$Kilobytes * 8
> data$Type = factor(data$Type)
> 
> # exlude irrelevant types
> data = subset(data, Type %in% c("InInterests", "OutInterests", "InData", "OutData"))
> 
> # combine stats from all faces
> data.combined = summaryBy(. ~ Time + Node + Type, data=data, FUN=sum)
> 
> data.root = subset (data.combined, Node == "root")
> data.leaves = subset(data.combined, Node %in% c("leaf-1", "leaf-2", "leaf-3", "leaf-4"))
> 
> # graph rates on all nodes in Kilobits
> g.all <- ggplot(data.combined) +
>   geom_point(aes (x=Time, y=Kilobits.sum, color=Type), size=1) +
>   ylab("Rate [Kbits/s]") +
>   facet_wrap(~ Node)
> 
> print(g.all)
> 
> # graph rates on the root nodes in Packets
> g.root <- ggplot(data.root) +
>   geom_point(aes (x=Time, y=Kilobits.sum, color=Type), size=2) +
>   geom_line(aes (x=Time, y=Kilobits.sum, color=Type), size=0.5) +
>   ylab("Rate [Kbits/s]")
> 
> print(g.root)
> 
> png("src/ndnSIM/docs/source/_static/root-rates.png", width=500, height=250)
> print(g.root)
> retval <- dev.off()
> _______________________________________________
> ndnSIM mailing list
> ndnSIM at lists.cs.ucla.edu
> http://www.lists.cs.ucla.edu/mailman/listinfo/ndnsim

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.lists.cs.ucla.edu/pipermail/ndnsim/attachments/20150216/e3145f3c/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 841 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <http://www.lists.cs.ucla.edu/pipermail/ndnsim/attachments/20150216/e3145f3c/attachment.bin>


More information about the ndnSIM mailing list