similar to: R-beta: is there a way to get rid of loop?

Displaying 20 results from an estimated 100 matches similar to: "R-beta: is there a way to get rid of loop?"

1997 Sep 05
2
R-beta: help with R simulation
[[this bounced first, because it has 'help' in the Subject line ... -- Martin Maechler ]] I am a complete novice R programmer. (Though I know C quite well) I am trying to write some R code to do the following simulation. There is a 2-frame "movie" of noise and signal dots. the noise dots have random positions in each frame. The signal dots are placed randomly in frame 1,
1998 Jul 09
1
numeric(0) -> NA
I noticed this in current intermediate patch version: > runif(0,0,4095) numeric(0) > round(runif(0,0,4095)) [1] NA I don't like it, but maybe it is the way it is supposed to be. I would prefer for it to stay numeric(0). I notice also > ceiling(runif(0,0,4095)) numeric(0) > floor(runif(0,0,4095)) numeric(0) which leads me to thing round() is not working right. I have some code
2009 Apr 09
1
.Call()
Hi guys, I want to transfer the following code from R into .Call compatible form. How can i do that? Thanks!!! INT sim; for(i in 1:sim){ if(i>2) genemat <- genemat[,sample(1:ncol(genemat))] ranklist[,1] <- apply(genemat, 1, function(x){ (mean(x[cols]) - mean(x[-cols]))/sd(x)}) ranklist <- ranklist[order(ranklist[,1]),]
2011 Oct 24
2
C function is wrong under Windows 7
Dear mailing list, I have a C function that gives me a wrong result when I run it under Windows 7. This is the code under Linux (RHEL5): > library(phenoTest) > data(epheno) > sign <- sample(featureNames(epheno))[1:20] > score <- getFc(epheno)[,1] > head(score) 1007_s_at 1053_at 117_at 121_at 1255_g_at 1294_at -1.183019 1.113544 1.186186 -1.034779 -1.044456
2008 Aug 06
1
error in installing R packages
Hello, I am trying to install R packages under linux, some of the packages can not be installed and I got the following error, could anybody give me suggestion on where the problem is and how to fix it? Thanks-e > .libPaths() [1] "/usr/lib64/R/library" [2] "/usr/share/R/library" [3]
2010 Mar 02
9
Filebench Performance is weird
Greeting All I am using Filebench benchmark in an "Interactive mode" to test ZFS performance with randomread wordload. My Filebench setting & run results are as follwos ------------------------------------------------------------------------------------------ filebench> set $filesize=5g filebench> set $dir=/hdd/fs32k filebench> set $iosize=32k filebench> set
2004 Mar 08
1
Am failing on making lagged residual after regression
Folks, I'm most confused in trying to do something that (I thought) out to be mainstream and straightforward R. :-) Could you please help? I am doing an ordinary linear regression. My goal is: After a regression, to make residuals, and make a new variable which is the lagged residuals (lagged by 1). I will use this variable in a 2nd stage regression (for an error-correcting model). This
2010 Jul 20
3
[LLVMdev] gold and debug information
On Tue, Jul 20, 2010 at 8:49 AM, Rafael Espindola <espindola at google.com>wrote: > > export PATH="$LLVMPREFIX/bin:$LLVMGCCPREFIX/bin:$PATH" > > export CC="llvm-gcc -use-gold-plugin -Wl,-plugin-opt=also-emit-llvm" > > export CXX="llvm-g++ -use-gold-plugin -Wl,-plugin-opt=also-emit-llvm" > > export RANLIB=/bin/true > > export
2005 Jan 06
2
patterns of missing data: determining monotonicity
Here is a problem that perhaps someone out here has an idea about. It vaguely reminds me of something I've seen before, but can't place. Can anyone help? For multiple imputation, there are simpler methods available if the patterns of missing data are 'monotone' --- if Vj is missing then all variables Vk, k>j are also missing, vs. more complex methods required when the
2011 Jun 01
1
Missing completely at random
Hello! I would like to sample 5 % of cases and from 1 to 3 variables within selected cases and set them as NA (MCAR-Missing completely at random). I managed to sample cases and variables, but I don’t know how to set them as NA. R code: N <- 1000      ####number of cases n <- 12           ####number of variables X <- matrix(rnorm(N * n), N, n)    ####matrix pMiss <- 0.05    
2012 Apr 25
1
forwarding packets to service in same host without using loopback network
This question is not about linux usage. But still i think user list is a good crowd for linux programmer. So here it goes. I have this libnetfilter_queue application which receives packets from kernel based on some iptables rule. Before going straight to my problem, i'm giving a sample workable code and other tools to set up a test environment so that We problem definition and possible
2012 Sep 04
4
[LLVMdev] Clang/llvm performance tests on FreeBSD 10.0-CURRENT
Hi all, I recently performed a series of compiler performance tests on FreeBSD 10.0-CURRENT, particularly comparing gcc 4.2.1 and gcc 4.7.1 against clang 3.1 and clang 3.2. The attached text file[1] contains more information about the tests, some semi-cooked performance data, and my conclusions. Any errors and omissions are also my fault, so if you notice them, please let me know. The
2010 Aug 03
2
Specifying interactions in rms package... error
I am encountering an error I do not know how to debug. The error arises when I try to add an interaction term involving two continuous variables (defined using rcs functions) to an existing (and working) model. The new model reads: model5 <- lrm( B_fainting ~ gender+ rcs(exactage, 7) + rcs(DW_nadler_bv, 7) + rcs(drawtimefrom8am, 7)+ DW_firsttime+ DW_race_eth +
2010 Jul 21
1
[LLVMdev] gold and debug information
On 7/21/2010 1:59 PM, Rafael Espindola wrote: >> I do not know how to get the ld invocation you need. If this command is not >> what you need, please tell me how to get the ld invocation. > Add -Wl,-debug to the llvm-gcc call. That should print the ld command > line in the end.
2006 Dec 12
0
They had produced so much butter, that they couldn't sell it on their own markets at the normal price.
So, it's advisable to grow cane as near to the factory as possible. He is the fourth person to resign at NFA. They sold it to Russia at virtually give away prices. uuuu WATCH LITL ON WEDNESDAY DEC 13! Company: L INTL COMPUTERS INC (Other OTC:LITL.PK) Symbol: LITL Mon Close: $0.99 5-day Target: $5 L Reveals 8-Way Processing Professional Mobile Computing Design CALL YOUR BROKER TO PLACE
2009 Mar 22
0
gsub('(.).(.)(.)', '\\3\\2\\1', 'gsub')
there seems to be something wrong with r's regexing. consider the following example: gregexpr('a*|b', 'ab') # positions: 1 2 # lengths: 1 1 gsub('a*|b', '.', 'ab') # .. where the pattern matches any number of 'a's or one b, and replaces the match with a dot, globally. the answer is correct (assuming a dfa engine).
2009 Mar 22
0
gsub('(.).(.)(.)', '\\3\\2\\1', 'gsub') (PR#13617)
Full_Name: Wacek Kusnierczyk Version: 2.10.0 r48181 OS: Ubuntu 8.04 Linux 32bit Submission from: (NULL) (129.241.199.135) there seems to be something wrong with r's regexing. consider the following example: gregexpr('a*|b', 'ab') # positions: 1 2 # lengths: 1 1 gsub('a*|b', '.', 'ab') # .. where the pattern matches any number of
2012 May 23
3
[LLVMdev] problem on clang+gold
Hi there, I compiled clang+gold using a gcc under path /s/gcc-4.3.1/bin/. Later on I do configure and make for flex-2.5.35, and the following command is invoked: "/path/to/my/gold/ld" --hash-style=gnu --no-add-needed --eh-frame-hdr -m elf_i386 -dynamic-linker /lib/ld-linux.so.2 -o flex /usr/lib/gcc/i386-redhat-linux/4.1.2/../../../crt1.o
2002 Dec 31
0
MRTGscript - Update
I found a error in my script but that is fixed in this version. /Rickard Eriksson -------------- next part -------------- #!/usr/bin/perl # Version: 1.1 # This is a script to use with mrtg to count shorewall entrys in the log. # # Updates can be found at: http://ftp.shorewall.net/pub/shorewall/contrib/ # Made by Rickard Eriksson riceri@home.se # # Here you can see what i have in my mrtg config
2009 Feb 02
2
Defining plot colors based on a variable
Hi, I have been trying unsuccessfully to plot data using different colors based on a variable within a subset of an imported file. The file I am reading is about 20000 lines long and has a column (in the example called FILE) that contains approximately 100 unique entries. I would like to plot a subset of the data from the file and key the color from the FILE column, This is what my file looks like