similar to: outer not applying a constant function

Displaying 20 results from an estimated 1000 matches similar to: "outer not applying a constant function"

2017 Mar 20
1
outer not applying a constant function
> Or is this a bad idea? I don't like the proposal. I have seen code like the following (in fact, I have written such code, where I had forgotten a function was not vectorized) where the error would have been discovered much later if outer() didn't catch it. > outer(1:3, 11:13, sum) Error in outer(1:3, 11:13, sum) : dims [product 9] do not match the length of object [1]
2017 Mar 20
0
outer not applying a constant function
>>>>> Gebhardt, Albrecht <Albrecht.Gebhardt at aau.at> >>>>> on Sun, 19 Mar 2017 09:14:56 +0000 writes: > Hi, > the function outer can not apply a constant function as in the last line of the following example: >> xg <- 1:4 >> yg <- 1:4 >> fxyg <- outer(xg, yg, function(x,y) x*y) >> fconstg
2008 Mar 25
3
derivatives in R
Hi, I posted this message earlier in "Rmetrics" and I don't know whether I posted in the wrong place, so I'm posting it again in Rhelp. I have a function in x and y and let's call it f(x,y). I need to get the Hessian matrix. i.e I need (d^2f/dx^2), (d^2f/dxdy), (d^2f/dydx), (d^2f/dy^2).I can get these using the D function. now I need to evaluste the hessian matrix for
2009 Jan 10
3
Applying 'lm' in each group
Hi,  I want to do regression in each group. I made the group the following way. Now I want to run regression in each of the three groups.. Suppose , x<-c(0.5578196,6.5411662,13.2728619,2.0217271,6.7216176,3.37220617,2.5773252,7.2600583,15.3731026,3.4140288,8.1335874,     15..6476637,4.3014084,9.1224379,18.5605355,4.7448394,11.9296663,18.5866354,12.3797674,18.7572812,2.70433816,2.88924220,
2009 Jan 25
1
Gibbs sampler...did it work?
I am writing a Gibbs sampler. I think it is outputting some of what I want, in that I am getting vector of several thousand values (but not 10,000) in a txt file at the end. My question is, is the error message (see below) telling me that it can't output 10,000 values (draws) because of a limitation in my memory, file size, shape etc, or that there is an error in the sampler itself? >
2003 Jul 14
2
Multipanel weighted regression lines.
Dear R-users, I am trying to create a multipanel scatter plot which displays weighted regression lines for each subgroup. I am having diffuculty figuring out how the Trellis multipanel plotting functions work, in general. Does someone know where there are some beginners examples on how to create and use panel.xxx functions in conjunction with the xyplot functions? Back to the matter at hand
2004 Mar 11
4
Summary: do.call and environments
To use the modify the solution from Tony and I so that you can pass the name of the function, rather than the function itself, like this: x <- 7 fx <- function(y) print(x*y) f <- function(fun, x) { fun <- get(fun) environment(fun) <- environment() do.call("fun",list(3)) } f("fx",2) --- Date: Thu, 11 Mar 2004 08:22:45 +0100 From:
2010 Feb 26
1
split function
Hi, I am using split function and wonder how to add the factor to the splitted results. #Example n <- 3; nn <- 10 g <- factor(round(n * stats::runif(n * nn))) #factor x <- rnorm(n * nn) + sqrt(as.numeric(g)) #value xg <- split(x, g) xg $`0` [1] 0.82513702 -0.03911584 2.32955347 0.36745335 1.75572642 2.65461438 0.41675829 $`1` [1] 0.8583493 2.4264804 -0.3622378
2018 May 22
3
Cannot delete folder
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Mon, 21 May 2018, Yves Goergen wrote: >> May 21 10:36:14 mond2 dovecot: imap(yg@****.de): Debug: Namespace : >> /var/mail/virtual/****.de/yg/.Test doesn't exist yet, using default >> permissions >> May 21 10:36:14 mond2 dovecot: imap(yg@****.de): Debug: Namespace : Using >> permissions from
2006 Apr 13
1
Working directory
Hi, I am a new user of "R", I am trying to read my data in.. "Cervixhc.dat" used to be in a different directory, now it has been moved to "O:\E&s\APC cervix FINAL (YG,MC,MD)\Manuscript\Data", but when I ran the following program (in red) I got an error message "Error in setwd(dir) : cannot change working directory", and "Error in file(file,
2018 May 21
2
Cannot delete folder
I guess you have had different version(s) or setting(s) in the past, and you can probably fix this by setting perms to same as the new folders. Aki On 21.05.2018 11:46, Yves Goergen wrote: > I couldn't find anything relevant between all the debug log lines. Is > that in /var/log/mail.log? > > Here's the lines I think are related to creating and deleting the folder: >
2010 May 12
1
exact the variables used in tree construction
> fit.dimer <- rpart(as.factor(out) ~ ., method="class", data=p_df) > > fit.dimer$frame[, "var"] [1] NE WC <leaf> TA <leaf> <leaf> WG WD WW WC [11] <leaf> <leaf> <leaf> CT <leaf> FC <leaf> YG QT <leaf> [21] <leaf> <leaf> NW DP DY <leaf> SK
2002 Jul 28
1
[R] bug in unsplit()? (PR#1843)
Hedderik van Rijn <hedderik@cmu.edu> writes: > If the second argument to unsplit is not a simple vector (but a "list > containing multiple lists"), the function seems to have some problems. > > Given a slight modification of the examples in help(split): > > > xg <- split(x,list(g1=g,g2=g)) > > unsplit(xg,list(g1=g,g2=g)) > [1] -0.7877109
2011 Jun 17
4
combining strings
Dear R People: Suppose I have the following two character vectors: xf [1] "W" NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA > xg [1] NA "k" "h" NA "g" "r" "j" NA "v" "d" NA "v" NA "z" "r" "r" "i" > I want to end up with "W"
2009 Jan 15
2
Interface to open source Reporting tools
Hi, I am a new user of R 2.8.1. I use Tinn-R for code editing. I use a windows 2003 system with 1 GB RAM. I am interested to generate dashboard and reports based on data from MS Access. These reports need to be posted on a weekly basis to the web. The reporting interface should provide facilities for "what if" scenarios. Is it possible to interface R analysis results to good open
2006 May 01
4
efficiency in merging two data frames
I have two data sets about lots of companies' stock and fiscal data. One is monthly data with about 144,000 lines, and the other is quaterly with about 56,000. Each data set takes different company code. I need to merge these two together. I read both ask cvs. And the other file with corresponding firm code. Now I have three data sets. return$PERMNO, account$GVKEY. id is the data frames
2018 May 20
3
Cannot delete folder
Assuming '8' = mail, i cannot see anything wrong here... Can you turn on 'mail_debug=yes' and attempt folder deletion, and check logs after that? Aki > On 20 May 2018 at 16:19 Yves Goergen <nospam.list at unclassified.de> wrote: > > > Here's the output of 'doveconf -n': > > # 2.2.22 (fe789d2): /etc/dovecot/dovecot.conf > # Pigeonhole
2004 Mar 10
5
do.call and environments
Hello, I want to call a function "fx" given by name, where some "global" variables (in the environment of fx) are passed to the function. For compatibility reasons I cannot modify the parameter list of fx and I want to avoid setting variables in the global environment (e.g. via <<-) Is there a way, how to do this? Thomas P. The example: fx <- function(y)
2011 Mar 22
1
help need on working in subset within a dataframe
Dear R-experts Execuse me for an easy question, but I need help, sorry for that. >From days I have been working with a large dataset, where operations are needed within a component of dataset. Here is my question: I have big dataset where x1:.....x1000 or so. What I need to do is to work on 4 consequite variables to calculate a statistics and output. So far so good. There are more vector
2018 Nov 05
3
Safe fptoui/fptosi casts
Hi everyone! The fptoui/fptosi instructions are currently specified to return a poison value if the rounded-towards-zero floating point number cannot be represented by the target integer type. The motivation for this behavior is that overflowing float to int casts in C are undefined behavior. However, many newer languages prefer to have a float to integer cast that is well-defined for all input