pearselab / r-intro-jenessalemon

r-intro-jenessalemon created by GitHub Classroom
0 stars 1 forks source link

Drawing * box #3

Open jenessalemon opened 8 years ago

jenessalemon commented 8 years ago

Hi Will, in the lecture_2 assignment, when we are asked to draw a box using *, are we just supposed to use the print function to do so? It's interesting that I couldn't find anything about this on google, considering you said that you have read a book about it! :S help! Also- I am kind of starting to wonder if it is humanly possible to finish these assignments. I have spent every minute away from my lab work and Bayesian Data Analysis course on this and I am way behind. Are other people having a hard time or am I just a really slow learner?

willpearse commented 8 years ago

You're not being a slow learner. I can't, and won't, comment on other classes you're taking, but this is a semester-long course compressed into half a semester. You will have to work quite hard to complete it, I'm afraid.

I'm not surprised you can't find anything on Google about it; I wouldn't want to give you exercises whose solutions you can find online :D You can use the print function to do it, but you might find it easier with cat. Maybe consider something along these lines:

#Top of box
#For loop
    cat("*")
#End loop
cat("\n") #What does this line do?...

#Middle of box
cat("*")
#...figure out a way to space out your text...

#Write out the bottom of the box

Does that help as a structure to get you started?

jenessalemon commented 8 years ago

Yes, I will keep working on it, thanks! Also are we not supposed to be using the internet? I never go to the internet first. But when I get totally stuck I do feel like it is a good way to get ideas to keep me going. I think it's really helpful to find examples and what not. But I will stop using it if we aren't supposed to! In my last programming course it was actually encouraged! (I think the reason why is because the internet is always there to help you write your own code, so it's helpful to learn how to use it.)

willpearse commented 8 years ago

By all means use the Internet! It's a great way to learn! But I make all of my exercises up myself so that you can't copy-paste an answer from the Internet, that's all.