Login

Create Account
+14156709189
info@expertsmind.com
Submit Homework/Assignment
Get quote & make Payment
Get Solution
Question with R  Bioinformatics, Applied Statistics
Hi There,
I have a question regarding R, and I am wondering if anyone can help me.
Here is a code that I would like to understand:
squareFunc < function(f) {
g < function(x) {
f(x)^2
}
return(g)
}
sin.2 < squareFunc(sin)
sin.2(1)
In the above code, function sin is nested in suquareFunc, which also has a function g inside.
I am having hard time understanding this code.
For example, if I was asked to write this code, mine would look like:
squareFunc < function(f) {
g < f^2
return(g)
}
sin.2 < squareFunc(sin)
sin.2(1)
and this does not work.
I feel that argument ''f'' in in squareFunc(f) should be passed on to the function ''g'', but what g has is (x).
Obviously the first code works if I type it in R, but I would like to understand how it works.
I may not be asking the right question, but if you can see where I am confused at and can help me to understand it, that would be great.
Thank you very much in advance.
Mayumi
Posted Date: 1/20/2013 8:46:28 PM  Location : Canada
Ask an Expert
Related Discussions:
Question with R  Bioinformatics, Assignment Help, Ask Question on Question with R  Bioinformatics, Get Answer, Expert's Help, Question with R  Bioinformatics Discussions
Write discussion on Question with R  Bioinformatics
Your posts are moderated
Write your message here..
Related Questions
Descriptive statistics, Descriptive Statistics : Carrying out an extens...
Descriptive Statistics : Carrying out an extensive analysis the data was not a subject to ambiguity and there were no missing values. Below are descriptive statistics that hav
T test, What is an example of a real life situation when I would use each o...
What is an example of a real life situation when I would use each of these test
Probability, .1 Modern hotels and certain establishments make use of an ele...
.1 Modern hotels and certain establishments make use of an electronic door lock system. To open a door an electronic card is inserted into a slot. A green light indicates that the
Logistic regression model, A marketing research firm was engaged by an auto...
A marketing research firm was engaged by an automobile manufacturer to conduct a pilot study to examine the feasibility of using logistic regression for ascertaining the likelihood
Confidence interval, for this proportion, use the +2 rule of thumb to dete...
for this proportion, use the +2 rule of thumb to determine the 95 percent confidence interval. when asked if they are satisfied with their financial situation, .29 said "very sat
Ashland MultiComm Services, Suppose that in the actual survey of 50 prospec...
Suppose that in the actual survey of 50 prospective customers, 6 subscribe to the 3 for all offer, what does this tell you about the previous estimate of the proportion of customer
Philosophy, what is the aim of statistics?
what is the aim of statistics?
Regression analysis, Meaning and Definitions of Regression The dictiona...
Meaning and Definitions of Regression The dictionary meaning of regression is just opposite the meaning of progression. Progression means to move forward while regression means
Quartiles, Related Positional Measures Besides median, there are other ...
Related Positional Measures Besides median, there are other measures which divide a series into equal parts. Important amongst these are quartiles, deciles and percentiles.
Stochastic regression, objective of the testing stochastic regression
objective of the testing stochastic regression
Assignment Help
Accounting Assignment Help
Economics Assignment Help
Finance Assignment Help
Statistics Assignment Help
Physics Assignment Help
Chemistry Assignment Help
Math Assignment Help
Biology Assignment Help
English Assignment Help
Management Assignment Help
Engineering Assignment Help
Programming Assignment Help
Computer Science Assignment Help
IT Courses and Help
ExpertsMind Services
Online Tutoring
Projects Assistance
Exam Preparation
Coursework Help
Programming Courses
Engineering Courses
Why Us ?
~Experienced Tutors
~24x7 hrs Support
~Plagiarism Free
~Quality of Work
~Time on Delivery
~Privacy of Work