similar to: R exercises - too confusing for me.

Displaying 20 results from an estimated 200 matches similar to: "R exercises - too confusing for me."

2004 Mar 21
0
Solutions to Exercises - Data Analysis & Graphics Using R
This message is aimed at anyone who may be using exercises from my book with John Braun for teaching purposes. I am using this channel of communication in the absence of any other obvious effective channel. I ask the forbearance of list members. Our intention is to post solutions to selected exercises (the more challenging exercises) on the web, via a link from
2011 Sep 19
0
work about all time series analysis with examples or exercises
I have a problem on the R, the truth I have never used this tool but I need to do some exercises of the university, for example not how to import a number, I need to know all the steps to make the series of time with graphics, the differentiation of the series, the autocorrelation, the vector prices, etc, need as this is being done and if there is a period or work to implement it, I would be
2011 Jun 20
0
Solutions to exercises in "Introductory Statistics with R" OR Intro. to R Book Suggestions with Solutions Available
Hi-- I'm trying to teach myself R using Peter Dalgaard's "Introductory Statistics with R." Does anyone know if there are solutions available for the exercises? I'm really just hoping to learn by going through exercises and checking myself, so alternatively, does anyone know of an introductory textbook to R that does have answers available either in the back or online?
2006 Aug 09
3
objects and environments
Dear list, I have two functions created in the same environment, fun1 and fun2. fun2 is called by fun1, but fun2 should use an object which is created in fun1 fun1 <- function(x) { ifelse(somecondition, bb <- "o", bb <- "*") ## mymatrix is created, then myresult <- apply(mymatrix, 1, fun2) } fun2 <- function(idx) { if (bb == "o) { #
2012 Nov 17
3
transform input argument (matrix) of function
Dear list!   I would like to write a function to transform matrix, which is input argument of a written function. It is easy with new matrix (see below), but my idea is to transform input argument (matrix) of function without any additional matrixes. Here is an example: fun1 <- function(xy) { xy <- cbind(xy[,1], xy[,2], xy[,1] + xy[,2]) return(xy) }   df1 <- matrix(c(1,2,3,1,2,3), ncol =
2012 Nov 08
5
map two names into one
Thanks. Yes. Your approach can identify: Glaxy ace S 5830 and S 5830 Glaxy ace But you can not identify using same program: Iphone 4S 16 G Iphone 4S 16G How should I solve both in same time. Kind regards,Tammy [[alternative HTML version deleted]]
2011 Apr 07
2
Two functions as parametrs of a function.
Hi R users: I'm trying to make a function where two of the parameters are functions, but I don't know how to put each set of parameters for each function. What am I missing? I try this code: f2<-function(n=2,nsim=100,fun1=rnorm,par1=list(),fun2=rnorm,par2=list()){ force(fun1) force(fun2) force(n) p1<-unlist(par1) p2<-unlist(par2) force(p1) force(p2)
2009 Oct 01
1
pass "..." to multiple sub-functions
Dear list, I know I have seen this discussed before but I haven't been successful in searching for "ellipsis", "dots", "..." in the archives. I would like to filter "..." arguments according to their name, and dispatch them to two sub-functions, say fun1 and fun2. I looked at lm() but it seemed more complicated than I need as it modifies the calling
2004 Mar 25
1
mlocal/mtrace inside a loop
Hello I need some help in figuring Bravington’s debugger out. Ok I have 2 functions, fun1 and fun2 saved in a ASCII file say filename is funs. Fun1 has a loop which calls fun2, fun2 has a loop which fails and I need to find out the value of the variables of the fun2 and fun1 loops at the specific iteration that fails. Both fun1 and fun2 loops will iterate thousands of times so line by line debug
2008 Oct 19
1
multivariate integral with ADAPT when the parameter is close to boundary
Dear All, There is one problem I encountered when I used ADAPT to compute some 2-D integral w.r.t beta density. For example, when I try to run the following comments: fun2<-function(theta){return(dbeta(theta[1],0.005,0.005)*dbeta(theta[2],0.005,0.005))} int.fun2<-adapt(ndim=2,lo = c(0,0), up = c(1,1),functn = fun2,eps = 1e-4) It seems it will take very long time to run. Acturally, I
2015 Feb 24
2
iterated lapply
> On Feb 24, 2015, at 10:50 AM, <luke-tierney at uiowa.edu> wrote: > > The documentation is not specific enough on the indented semantics in > this situation to consider this a bug. The original R-level > implementation of lapply was > > lapply <- function(X, FUN, ...) { > FUN <- match.fun(FUN) > if (!is.list(X)) > X <-
2002 Aug 01
6
update() can not find objects (PR#1861)
Full_Name: Yi-Xiong Zhou Version: 1.5.1 OS: win2000pro Submission from: (NULL) (64.169.249.42) Update() can not find objects when it is used in a function, which is in turn being called by another function. Here is a R script to show the problem: ######## begin of the test script ########## fun1 <- function() { x <- matrix(rnorm(500), 20,25) y <- rnorm(20) oo <- lm(y~x)
2014 Jan 25
1
package NAMESPACE question
Hello, I'm building a package. My code is stored in foo.R. This code has two functions FUN1 and FUN2. FUN1 calls FUN2. FUN1 is listed in export() under the package NAMESPACE but NOT FUN2. After building the package when I call FUN1 is giving me an error that cannot find FUN2. I solved this by adding FUN2 in the export() NAMESPACE. However, what is puzzling me is that I have other examples
2006 Aug 16
1
Problem with the special argument '...' within a function
I'm not sure if this is what you want, but simply add ... to the list of arguments for fun1 and fun2 would eliminate the error. Andy From: Hans-Joerg Bibiko > > Dear all, > > I wrote some functions using the special argument '...'. OK, it works. > > But if I call such a function which also called such a > function, then I get an error message about unused
2012 Dec 20
1
[LLVMdev] vmlx forwarding an cortex A9 question
Hi all, On following code when I use llc targeting ARM Cortex-A9 as follows, if vmlx-forwarding is turned off then 'vmla' instructions are generated. It seems that -mcpu=cortex-a9 enables it by default and thus less 'vmla' instructions are generated. On this specific example it doesn't make any difference in term of performance, but on a more complex example disabling
2012 Nov 20
2
correct function formation in R
Dear list! ? I have question of?'correct function formation'. Which function (fun1 or fun2; see below) is written more correctly? Using ''structure'' as output or creating empty ''data.frame'' and then transform it as output? (fun1 and fun1 is just for illustration). ? Thanks a lot, OV ? code: input <- data.frame(x1 = rnorm(20), x2 = rnorm(20), x3 =
2012 Aug 30
1
How to modify the values of the parameters passing via ...
Dear Friends, Let's assume there are three parameters that were passed into fun1. In fun1, we need to modify one para but the remains need to be untouched. And then all parameters were passed into fun2. However, I have failed to achieve it. Please see the following code. ########################################## fun1 <-function(x, y, z=10) {x+y+z;} fun2 <-function(aa, ...) {
2004 Mar 23
3
how to modify variables of another frame (but not global)
Hello! Maybe "frame" is not the right term in this context. I explain my problem by example code: fun2 <- function(objName, add) { ## the object "objName" should be increased by "add", ## but the evaluation should be done in the calling function (here: fun1) ## ...... what's the right code?? } fun1 <- function() { x <- 1 fun2("x",
2011 Dec 12
1
Lagged values problem requiring short solution time
Hello, I am hoping someone can help tackle the problem below, for which I require a fast solution. It feels like there should be an elegant approach, but I am drawing blanks. Take a vector 'x' with random values > 0: x = runif(10,1,5) Assume some reasonably small positive value 'delta': delta = 0.75 The task is to find a solution vector 'y' of same length as
2012 Nov 11
2
changing the signs in rows or columns in matrices and check them if they are identical
Dear R users, i have this problem with matrices i want to check between two matrices if they are isomorphic i will give an example for what excactly i want   1 -1  1                                 -1  1   1 -1   1  -1                                1  -1  -1   1  1   -1                                1   1  -1 this two matrices are isomorphic beacause if i change the first 2 columns the matrices