similar to: Outer with Three Vectors

Displaying 20 results from an estimated 2000 matches similar to: "Outer with Three Vectors"

2005 Oct 31
1
[R] unvectorized option for outer()
> From: Thomas Lumley > > On Sun, 30 Oct 2005, Jonathan Rougier wrote: > > > I'm not sure about this. Perhaps I am a dinosaur, but my feeling is > > that if people are writing functions in R that might be subject to > > simple operations like outer products, then they ought to be writing > > vectorised functions! > > I would agree. How about an
2011 May 26
3
change function scope?
I'm still getting used to R's scoping. I've run into the following situation value=0 thefunction <- function() print( value ) somefunction <- function() { value=99; thefunction() } somefunction() now, I understand that somefunction() returns 0 because thefunction() was defined with value=0 in its parent envrionment, it dosent look at all in the environment of somefunction. My
2011 Mar 30
3
how about a "<p-" operator?
I was cursing Matlab again today (what else is new) because the default action for every Matlab command is to spew the result to the console, and one must remember to put that darn ";" at the end of every line. So I just wondered: was there ever a discussion as to providing some modified version of the "<-" and "->" operators in R to do the reverse?
2006 Mar 21
2
Multiple commands per priority
Hi everybody. I have been searching and trying for an answer, but no luck, so here I go.. Is there anyway to execute multiple commands on a single priority in extensions.conf? eg: exten => X.,1,Dial(SIP/1111) & somefunction(${EXTEN}) I need the dial command to dial internal extensions, and the "somefunction" to kick of our own outgoing system for redirection to outside lines;
2010 Dec 01
2
default arguments and '...' in a function
Dear R-users, I'm trying to work out a way to set default values for arguments in a function which includes the optional argument '...'. In practice, I have a 'plot' method for a function which specifies different types of plots. Every different plot should have different default arguments (for example for 'col', 'ylim' etc), plus the argument '...' to
2002 Nov 07
2
combinations
I need to construct all possible combinations of an vector of length N taken X at a time for simulation purposes. Taking a a small vector as an example: >input <- c('a','b','c','d') >somefunction(input) a,b,c a,b,d a,c,d b,c,d my only solution thus far is: somefunction <- function(x){ ...a series of grotesque and horribly inefficient loops
2009 Oct 11
3
[LLVMdev] Problems linking shared library with __declspec(dllexport)
Hi all, I am trying to use llvm-gcc to link shared libraries on windows/mingw32. When I try to link libraries that contain functions declared with __declspec(dllexport) someFunction(); I get the link error: Cannot export _someFunction: symbol not found Removing the declspec directive solves the problem, but this is not a very feasible solution for me. Using 'regular' gcc does not
2009 Oct 11
0
[LLVMdev] Problems linking shared library with __declspec(dllexport)
> I am trying to use llvm-gcc to link shared libraries on windows/mingw32. > When I try to link libraries that contain functions declared with >  __declspec(dllexport) someFunction(); > > I get the link error: > >  Cannot export _someFunction: symbol not found dllexport declspec should be put on the function definition, in this example there is nothing to export - dllexport
2007 Feb 28
1
problem with help.start and ?somefunction
Hi all, I am going to be teaching a workshop next week using R and Bioconductor in one of our university's computer labs. They have recently installed R 2.4.1 for me, and I'm checking all my scripts. I just noticed that using the ?somefunction call to access the documentation for that function is not working. On my own PC, the ? call output changed between R 2.3 and 2.4; before it would
2016 Jun 14
2
Calling a null pointer. How undefined it is?
Hi all: This question is related to a state machine generated by LLVM for a coroutine. I stripped all coroutine related details to get to the essence of the question. Let's say I have a state machine that looks like this: struct State { FnPtr Fn; State() : Fn(&SomeFunction) {} void Go() { (*Fn)(); } void Stop() { Fn = nullptr; } bool IsDone() { return Fn ==
2008 Mar 25
1
peak finding
Hi all Is there a function that can find the start and end position of peaks in a set of numbers. eg. x=c(14,15,12,11,12,13,14,15,16,15,14,13,12,11,14,12) y=somefunction(x) y 4 14 Thanks John [[alternative HTML version deleted]]
2008 May 13
2
Remove an object by the reference
Hi R, A simple question, but don't know the answer... x="a" a=5 I need to remove the object "a" by using only x. something like rm(somefunction(x))...Is this possible? Shubha Karanth | Amba Research Ph +91 80 3980 8031 | Mob +91 94 4886 4510 Bangalore * Colombo * London * New York * San José * Singapore * www.ambaresearch.com This e-mail may contain
2010 May 12
3
intersect
Hi there, how can I test every element in a vector whether appears in another vector? such as a<-c("aa", "bb", "ff", "cc") b <-c("oo","jj","bb","cc") somefunction(a,b) gives [False, True, False, True] thanks yuan jian [[alternative HTML version deleted]]
2007 Feb 27
3
How to use bash command in R script?
Dear All: Maybe it is a too basic question, but I don't how to find the answer. Sorry for that. What I want to do is call a shell command, which will provide two numbers, and assign those numbers to a vector. For example: The following command: $mxresult.sh ABC.mx mxresult.sh is a script written by myself and ABC.mx is a Mx script. I can get two numbers, 126.128 and 29, with this command.
2005 Sep 20
1
Xgird, R, parallel computing
Hi, list, Sorry if I am bothering you. I am interested in using xgrid with R for distributed computing. I am using MacOS X and my R 2.1. 1 is already installed and running. The client computers are all of the same type and the same version of R has been installed on them. We have also set up xgrid on my system and client computers as well. I am wondering if any one can give me some clues
2010 Mar 12
2
[LLVMdev] large modules, PPC on OS X, "ld: 32-bit pic-base out of range in"
I'm trying to build a very large shared library (bundle) for PPC on Mac OS X 10.5. The build looks something like this, where mybundlebitcode.o is the large object llc -relocation-model=pic -o=mybundle.s mybundlebitcode.o gcc -arch ppc -c -x assembler -o mybundle.o mybundle.s g++ -o mybundle.bundle -bundle mybundle.o -lotherlibrary I get the following error: ld: 32-bit pic-base out of
2020 Oct 27
3
R for-loop to add layer to lattice plot
Hello, I am using e1071 to run support vector machine. I would like to plot the data with lattice and specifically show the hyperplanes created by the system. I can store the hyperplane as a contour in an object, and I can plot one object at a time. Since there will be thousands of elements to plot, I can't manually add them one by one to the plot, so I tried to loop into them, but only the
2008 Oct 08
5
ParallelR
Anyone using or has access to ParallelR? I was looking at the page and found nothing really useful! http://www.revolution-computing.com/sitegenius/topic.php?id=195 I want to see if I can run R on a cluster of workstation, and use batch systems like Grid Engine or Xgrid: http://gridengine.sunsource.net/ http://ww.apple.com/acg/xgrid/ --Chi
2006 Feb 24
3
Summarize by two-column factor, retaining original factors
I am having trouble doing the following. I have a data.frame like this, where x and y are a variable that I want to do calculations on: Name Year x y ab 2001 15 3 ab 2001 10 2 ab 2002 12 8 ab 2003 7 10 dv 2002 10 15 dv 2002 3 2 dv 2003 1 15 Before I do all the other things I need to do with this data, I need to summarize or collapse the data by name and year. I've
2019 Jan 16
2
Skipping construction/destruction of stack allocated objects
Hello, For performance reasons, I would like to provide a way to skip construction/destruction of objects that are stack allocated. Typically, C-style arrays of std::complex create an initialization loops that is almost always unnecessary. I am thinking of providing an __attribute__((uninitialized)) that can be applied to an object declaration: { std::complex<float> foo[64][64]