Displaying 20 results from an estimated 6000 matches similar to: "Keyboard input into functions"
2004 Aug 30
3
Multiple lapply get-around
I am faced with a situation wherein I have to use multiple lapply's. The
pseudo-code could be approximated to something as below:
For each X from i=1 to n
For each Y based on j=1 to m
For each F from 1 to f
Do some calculation based on Fij
Store Xi,Yj = Fij
End For F
End for Y
End for X
Is there anyway to optimize the processing logic further? I *guess*
using the multiple lapply
2004 Apr 20
2
Rank - Descending order
Dear All,
Is there any simple way to way to produce "rank", for a given
list, but in a descending order?
E.G:
x = list(a=c(1,5,2,4));
rank(x$a); produces 1,4,2,3
However I am looking for a way to generate (4,1,3,2).
It would be particularly nice if the proposed solution has all
the niceties of rank function (like NA handling and ties.method
functionality)
TIA
Manoj
2004 Jun 09
1
Multiple regression
Hi,
I am trying to do multiple regression on a set of data using backward stepwise regression....however backward stepwise regression is critised for overfitting data. To actually observe the bias and to come up with a better method to use..Could you all stats experts kindly give me pointers to any alternative procedure (or references) to use over backward stepwise regression from your
2004 Nov 19
2
Performing regression using R & C
Dear All,
Is it possible to perform OLS using C code? I am trying to
optimize a n-period "moving window" OLS on a huge dataset hence was
wondering if such a thing is possible.
Ideally the solution that I am looking for would involve a
C-code accepting two float arrays and returning back computed parameters
such as t-stat, coefficient etc.
I have glanced thru the FAQ's and tried
2003 Oct 20
4
Processing logic for Huge Data set
Hello All,
I am new to R. I am trying to process this huge data set of
matrix containing four columns, say x1, x2, x3, x4 and n number of rows.
I want to aggregate the matrix by x1 and perform statistic based on
columns x2, x3, x4. I tried aggregate function but it gave me memory
allocation error (which I am not surprised), so I ended up performing a
for loop based on x1 and
2004 Jun 14
2
CVnn2 + nnet question
Hi,
I am trying to determine the number of units in the hidden layer
and the decay rate using the CVnn2 script found in MASS directory
(reference: pg 348,MASS-4).
The model that I am using is in the form of Y ~ X1 + X2 + X3...
+ X11 and the underlying data is time-series in nature.
I found the MASS and nnet package extremely useful (many thanks
to the contributors).
However I am getting
2003 Dec 16
1
Calling C function in R
Hi All,
I am trying to write a c function to optimize loop processing.
Having read the R extension and trying out a few samples I was pretty
comfortable with the basics.
However, I am wondering if there is anyway to call tseries
functions like adf.test or po.test from within c function. Any pointers/
code sample would be greatly appreciated.
Thank you.
Manoj
2012 Jan 21
1
[PATCH] include/checkpatch: Prefer __scanf to __attribute__((format(scanf, ...)
It's equivalent to __printf, so prefer __scanf.
Signed-off-by: Joe Perches <joe at perches.com>
---
include/linux/compiler-gcc.h | 3 ++-
include/linux/kernel.h | 8 ++++----
include/xen/xenbus.h | 4 ++--
scripts/checkpatch.pl | 6 ++++++
4 files changed, 14 insertions(+), 7 deletions(-)
diff --git a/include/linux/compiler-gcc.h
2012 Jan 21
1
[PATCH] include/checkpatch: Prefer __scanf to __attribute__((format(scanf, ...)
It's equivalent to __printf, so prefer __scanf.
Signed-off-by: Joe Perches <joe at perches.com>
---
include/linux/compiler-gcc.h | 3 ++-
include/linux/kernel.h | 8 ++++----
include/xen/xenbus.h | 4 ++--
scripts/checkpatch.pl | 6 ++++++
4 files changed, 14 insertions(+), 7 deletions(-)
diff --git a/include/linux/compiler-gcc.h
2004 Dec 03
1
Difficulty implementing "scales" in a lattice plot
Hello all,
I am rather new to lattice and have a simple question regarding formatting text labels on the axes. I have looked through my own archive on lattice notes, searched and examined 30 or so hits on Dr. Baron's search site, looked through my MASS book, my Data Analysis and Graphics Using R book, R news articles, and I have in my hand the lattice package instructions and have read and
2020 May 22
6
RFC: *scanf vs. overflow
It has long been known that the C specification of *scanf() leaves
behavior undefined for things like
int i;
sscanf("9999999999999999", "%i", &i);
C11 7.21.6.2 P12
"Matches an optionally signed integer, whose format is the same as
expected for the subject sequence of the strtol function with the value
0 for the base argument."
C11 7.21.6.2 P10
"If this
2019 Feb 02
2
[llvm-xray] llvm-xray cannot log every functions
Hi there,
I have a problem using the function call tracing tools that is designed in llvm tools set. My aim is to record every function call that a program makes when it run. However, for whatever reason, a simple matrix multiply c program that I wrote cannot record all the function calls that happened when the program run.
Here is the program: matrix.c
#include <stdio.h>
void
2004 Aug 27
1
selecting unique columns of a matrix/data frame
Hi all,
I have a very high dimensional data and apparently there are several
columns that contain similar information (some columns are equal). I
want to form a matrix/data frame consisting of unique columns. Does
anyone have an efficient way of getting out these columns. A small
section of the data frame is given below.
Thanks for helping.
Stephen.
> newdata
[,1] [,2] [,3] [,4] [,5]
2010 Mar 04
1
[LLVMdev] Doubt with GVNPRE
Hi,
I have a program as:
int main(int argc, char **argv)
{
int a,b,k,l;
scanf("%d%d",&a,&b);
if (argc > 1) {
k=a+b;
} else {
k=5;
}
l=a+b;
printf("%d,%d",k,l);
return 0;
}
Now i run the following on it:
llvm-gcc -O1 -emit-llvm -c -o 1.bc 1.c
llvm-dis 1.bc -o 1.ll
opt
2003 Apr 05
1
flock a file in a NT server
Hi,
I'm writing an application with C under Linux and I'm trying to use the
flock system function to lock a file of an NT4 Server over Samba. The
problem is that the lock works well within the same machine but if it
is a process on another machine (the same program) the one that tries
to access the locked file, the process is not blocked until the lock is
released but given full access
2006 Jan 12
5
dtrace and follow fork
I am trying to use dtrace to trace all sscanf calls.
I am able to use pid provider for this.
But my application forks off children at times to
handle requests.
Is there a way I can stop the child process
immediately after it is started so that
I can attach a pid provider to that and trace the
scanf calls in it?
I have tried using the "create" probe but that did
not help.
2014 Aug 13
2
[LLVMdev] Efficient Pattern matching in Instruction Combine
Thanks Sean for the reference.
I will go through it and see if i can implement it for generic boolean
expression minimization.
Regards,
Suyog
On Wed, Aug 13, 2014 at 2:30 AM, Sean Silva <chisophugis at gmail.com> wrote:
> Re-adding the mailing list (remember to hit "reply all")
>
>
> On Tue, Aug 12, 2014 at 9:36 AM, suyog sarda <sardask01 at gmail.com> wrote:
2010 May 28
2
[LLVMdev] Basic doubt related to Module::iterator
Hi,
Yeah I found that it is running LLVM's functions. The functions that are
running are:
main
llvm.dbg.func.start
llvm.dbg.stoppoint
scanf
llvm.dbg.region.end
But I dont want all the functions to be called as I am using Dominator
Trees and whenever I the statement
DominatorTree &DT = getAnalysis<DominatorTree>(F);
is encountered by functions other than main, it gives error.
2014 Aug 08
4
[LLVMdev] Efficient Pattern matching in Instruction Combine
Hi Duncan, David, Sean.
Thanks for your reply.
> It'd be interesting if you could find a design that also treated these
> the same:
>
> (B ^ A) | ((A ^ B) ^ C) -> (A ^ B) | C
> (B ^ A) | ((B ^ C) ^ A) -> (A ^ B) | C
> (B ^ A) | ((C ^ A) ^ B) -> (A ^ B) | C
>
> I.e., `^` is also associative.
Agree with Duncan on including associative operation too.
2011 Mar 21
3
[LLVMdev] Contributing to Polly with GSOC 2011
Dear all,
I am Raghesh, a student pursuing M.Tech at Indian Institute of
Technology, Madras, India.
I would like to make contribution to the Polly project
(http://wiki.llvm.org/Polyhedral_optimization_framework) as part of
GSOC 2011. I have gained some experience working in OpenMP Code
generation for Polly. This is almost stable now and planning to test
with the polybench benchmarks.
Some of