How JustAnswer Works:
  • Ask an Expert
    Experts are full of valuable knowledge and are ready to help with any question. Credentials confirmed by a Fortune 500 verification firm.
  • Get a Professional Answer
    Via email, text message, or notification as you wait on our site.
    Ask follow up questions if you need to.
  • 100% Satisfaction Guarantee
    Rate the answer you receive.
Ask George Sibiya Your Own Question
George Sibiya
George Sibiya,
Category: Programming
Satisfied Customers: 91
Experience:  Research Scientist at CSIR
Type Your Programming Question Here...
George Sibiya is online now
A new question is answered every 9 seconds

Here is a HW problem that should need to use R software to

This answer was rated:

Here is a HW problem that should need to use R software to solve it. If you can help me about that, I will give you the data. Thank you.


Welcome to JustAnswer and thank you for utilising our services.

You may share the hw details I can help.



Customer: replied 5 months ago.
here is the data, and the deadline is Oct. 20:00pm (EST). Thank you.

Ok thanks,

Just two questions.

Did you mean October 20?

Are there any specific questions that need to be answered through the data analysis or a description of the data?



Customer: replied 5 months ago.
I mean Oct 19,20:00pm(EST). please answer all the question on R attachment.

Ok. But I have only received node.docx and data 1.docx and there are no questions in them just data.

Customer: replied 5 months ago.
it is on my fist post, named R

I see. I cannot access you earlier post you may kindly reattach all relevant files.

Customer: replied 5 months ago.
ok,I gonna give you it in an hour when I go home.

Ok thanks.

Customer: replied 5 months ago.
Can you see the r file?

No it does not want to show on my dashboard, I'll wait until you get home.

Customer: replied 5 months ago.
Here is the problem

Ok thank u

Just a status update. I am doing the pie charts.

I am not sure about number 2, if you understand what it wants you can break it down then I'll put it in code


#Number 1

links <- read.csv("links.csv")
nodes <- read.csv("nodes.csv")

# Number 2
nrow(nodes); length(unique(nodes$id))
nrow(links); nrow(unique(links[,c("source", "target")]))


# Number 3

# In-degree
degree(net, mode="in")

# Out-degree
degree(net, mode="out")

# Number 4

net <- graph_from_data_frame(d=links, vertices=nodes, directed=T)
net <- simplify(net, remove.multiple = F, remove.loops = T)
deg <- degree(net, mode="all")
V(net)$size <- deg*3
# Set edge width based on weight:
E(net)$width <- E(net)$weight/6
E(net)$width <- 1+E(net)$weight/12
l <- layout.bipartite
plot(net, edge.arrow.size=.4, layout=l)

Customer: replied 5 months ago.
sorry,I do not know how to do number

Ok I think I get it after reading it multiple times. The structuring of the sentence there is just not clear its joined 'and' too many times.

# Number 5. 1 a)

age_calc <- function(b_year){
start <- b_year
end <- 2016
result <- end - start

ages = lapply(E(net)$birth_year, age_calc);
df=data.frame(id=paste('R',seq( ),sep=''),value=as.numeric(c(ages)))

# making groups

# calculating %ages for slice

perct <- round(slice/sum(slice)*100)
lbls <- c("under 30", "30 to 50", "Over 50")
lbls <- paste(lbls, perct)
lbls <- paste(lbls,"%",sep=" ")
# make pie

# Number 5. 1 b)
mytable <- table(E(net)$gender)
lbls <- c("Males", "Females")
pct <- round(mytable/sum(mytable)*100)
lbls <- paste(lbls, pct) # add percents to labels
lbls <- paste(lbls,"%",sep="")
pie(mytable, labels = lbls, main="Gender")

Customer: replied 5 months ago.
thank you so much

Everything packeged together

George Sibiya and other Programming Specialists are ready to help you