Submitted by Anonymous on Tue, 01/12/2010 - 15:12.
Hey, I'm new at programming. I'm studying C++ now, but our teacher gave each one of my class the task to find information about different language, mine was R. He also gave me that task: "Input an integer number n and output the sum: 1+2^2+3^2+...+n^2. Use input validation for n to be positive." I really don't know how to start.. and soon i'll have to give it to him... I know that for you it would be an easy task, so could someone help me please?
Submitted by Anonymous on Tue, 12/15/2009 - 12:20.
Begin by practicing using the three screens which will come up. As you move your mouse around from screen to screen (New Script - found under file in your first screen, Graphs - need to save as PDF file to be able to retrieve, and the first screen.) As you click to each screen you will see what is available to work with on that screen, as it changes for each screen. Good luck,
little help wanted
Hey, I'm new at programming. I'm studying C++ now, but our teacher gave each one of my class the task to find information about different language, mine was R. He also gave me that task: "Input an integer number n and output the sum: 1+2^2+3^2+...+n^2. Use input validation for n to be positive." I really don't know how to start.. and soon i'll have to give it to him... I know that for you it would be an easy task, so could someone help me please?
Little help
Something like this but need to check on positive number validation such as abs or use logical n>=0
Fun1 <- function(n) {
n1 <- c(rev(seq(n)))
n2 <- c(n1^2)
sum(1,n2)
}
I'm new also
I am new to R and I like the power of it but I have no idea how to get started using it. Can anyone give me some helpfull advice?
New Use
Begin by practicing using the three screens which will come up. As you move your mouse around from screen to screen (New Script - found under file in your first screen, Graphs - need to save as PDF file to be able to retrieve, and the first screen.) As you click to each screen you will see what is available to work with on that screen, as it changes for each screen. Good luck,