Displaying 20 results from an estimated 300 matches similar to: "help: program efficiency"
2010 Jun 08
1
Filtering out a data.frame
Sample Data.Frame format
Name is Returns.nodup
X id ticker date_ adjClose totret RankStk
427225 427225 00174410 AHS 2001-11-13 21.66 100 1235
"id" uniquely defines a row
What I am trying to do is filter out id's that have less than 1500 data
points (by date)
First, I used
total<-by(Returns.nodup, Returns.nodup$id,nrow)
which subsetted by
2010 Dec 01
5
Pass an operator to function
Hi guys,
How to pass an operator to a function. For example,
test <- function(a, ">", b)
{
return(a>b) #the operator is passed as an argument
}
Thanks,
--
View this message in context: http://r.789695.n4.nabble.com/Pass-an-operator-to-function-tp3066627p3066627.html
Sent from the R help mailing list archive at Nabble.com.
2014 Jul 26
20
[RFC PATCH 00/11] Refactor MSI to support Non-PCI device
Hi all,
The series is a draft of generic MSI driver that supports PCI
and Non-PCI device which have MSI capability. If you're not interested
it, sorry for the noise.
The series is based on Linux-3.16-rc1.
MSI was introduced in PCI Spec 2.2. Currently, kernel MSI
driver codes are bonding with PCI device. Because MSI has a lot
advantages in design. More and more non-PCI devices want to
use
2014 Jul 26
20
[RFC PATCH 00/11] Refactor MSI to support Non-PCI device
Hi all,
The series is a draft of generic MSI driver that supports PCI
and Non-PCI device which have MSI capability. If you're not interested
it, sorry for the noise.
The series is based on Linux-3.16-rc1.
MSI was introduced in PCI Spec 2.2. Currently, kernel MSI
driver codes are bonding with PCI device. Because MSI has a lot
advantages in design. More and more non-PCI devices want to
use
2007 Sep 25
2
Need help with function writing
Hello:
If anyone could guide me with this I would greatly appreciate it. Thanking you in advance for your assistance.
Using a 3-level input factor alternative so that a function(below) can compute both a two-sided and one-sided p-values. Making the two-sided test the default. And produce output information about which alternative was tested. Where would I place the ifelse statement?
2007 Jul 27
3
(PR#9811) sequence(c(2, 0, 3)) produces surprising results,
This is as doumented, and I think you could say the same thing of seq().
BTW, sequence() allows negative inputs, and I don't think you want
sum(input) in that case.
I've never seen the point of sequence(), but it has been around in R for a
long time. It is used in packages eRm, extRemes, hydrosanity, klaR, seas.
Who knows what people have in private code, so I don't see any
2014 Aug 20
1
[RFC PATCH 11/11] x86/MSI: Refactor x86 MSI code
> -----Original Message-----
> From: linux-pci-owner at vger.kernel.org [mailto:linux-pci-owner at vger.kernel.org]
> On Behalf Of Yijing Wang
> Sent: Saturday, July 26, 2014 8:39 AM
> To: linux-kernel at vger.kernel.org
> Cc: Xinwei Hu; Wuyun; Bjorn Helgaas; linux-pci at vger.kernel.org;
> Paul.Mundt at huawei.com; James E.J. Bottomley; Marc Zyngier; linux-arm-
> kernel at
2014 Aug 20
1
[RFC PATCH 11/11] x86/MSI: Refactor x86 MSI code
> -----Original Message-----
> From: linux-pci-owner at vger.kernel.org [mailto:linux-pci-owner at vger.kernel.org]
> On Behalf Of Yijing Wang
> Sent: Saturday, July 26, 2014 8:39 AM
> To: linux-kernel at vger.kernel.org
> Cc: Xinwei Hu; Wuyun; Bjorn Helgaas; linux-pci at vger.kernel.org;
> Paul.Mundt at huawei.com; James E.J. Bottomley; Marc Zyngier; linux-arm-
> kernel at
2011 Oct 08
1
HWEBayes, swapping the homozygotes genotype frequencies
I evaluated the Bayes factor in the k=2 allele case with a "triangular"
prior under the null as in the example in the help file:
HWETriangBF2(nvec=c(88,10,2))
[1] 0.4580336
When I swap the n11 entry and n22 entry of nvec, I received totally
different Bayes factor:
>
> HWETriangBF2(nvec=c(2,10,88))
[1] 5.710153
>
In my understanding, defining the genotype frequency as
2014 Aug 20
1
[RFC PATCH 10/11] PCI/MSI: Split the generic MSI code into new file
> -----Original Message-----
> From: linux-pci-owner at vger.kernel.org [mailto:linux-pci-owner at vger.kernel.org]
> On Behalf Of Yijing Wang
> Sent: Saturday, July 26, 2014 8:39 AM
> To: linux-kernel at vger.kernel.org
> Cc: Xinwei Hu; Wuyun; Bjorn Helgaas; linux-pci at vger.kernel.org;
> Paul.Mundt at huawei.com; James E.J. Bottomley; Marc Zyngier; linux-arm-
> kernel at
2014 Aug 20
1
[RFC PATCH 10/11] PCI/MSI: Split the generic MSI code into new file
> -----Original Message-----
> From: linux-pci-owner at vger.kernel.org [mailto:linux-pci-owner at vger.kernel.org]
> On Behalf Of Yijing Wang
> Sent: Saturday, July 26, 2014 8:39 AM
> To: linux-kernel at vger.kernel.org
> Cc: Xinwei Hu; Wuyun; Bjorn Helgaas; linux-pci at vger.kernel.org;
> Paul.Mundt at huawei.com; James E.J. Bottomley; Marc Zyngier; linux-arm-
> kernel at
2007 Sep 24
1
hypothesis testing
This was sent to me by someone on the R-list ( I don't know her ) but I
don't have time to look at this right now so I told her I would send
it to the R-list because she said it keeps getting bounced when she
sends it.
#=======================================================================
====================================================================
I am a bit confused with
2010 Nov 28
1
faster base::sequence
Hello,
Based on yesterday's R-help thread (help: program efficiency), and
following Bill's suggestions, it appeared that sequence:
> sequence
function (nvec)
unlist(lapply(nvec, seq_len))
<environment: namespace:base>
could benefit from being written in C to avoid unnecessary memory
allocations.
I made this version using inline:
require( inline )
sequence_c <- local( {
2010 Dec 03
1
Error using Rcpp under windows xp
Hi,
I am a newbie to Rcpp packages, and got problems in having basic set-ups for
Rcpp under windows xp. Here is the list I have done.
1) installed Rtools and have no problem in compiling .c file.
2) installed Rcpp packages
3) set enviroment variables 'path' to make C:\Program
Files\R\R-2.12.0\library\Rcpp\include\ searchable
The sample C++ code I used is from the original website:
2010 Dec 23
2
python-like dictionary for R
Hi,
I was wondering if anyone has played around this this package called
"rdict"? It attempts to implement a hash table in R using skip lists. Just
came across it while trying to look for simpler text manipulation methods:
http://userprimary.net/posts/2010/05/29/rdict-skip-list-hash-table-for-R/
Cheers,
Paul
[[alternative HTML version deleted]]
2009 May 07
2
[PATCH] msi-x: let drivers retry when not enough vectors
pci_enable_msix currently returns -EINVAL if you ask
for more vectors than supported by the device, which would
typically cause fallback to regular interrupts.
It's better to return the table size, making the driver retry
MSI-X with less vectors.
Signed-off-by: Michael S. Tsirkin <mst at redhat.com>
---
Hi Jesse,
This came up when I was adding MSI-X support to virtio pci driver,
which
2009 May 07
2
[PATCH] msi-x: let drivers retry when not enough vectors
pci_enable_msix currently returns -EINVAL if you ask
for more vectors than supported by the device, which would
typically cause fallback to regular interrupts.
It's better to return the table size, making the driver retry
MSI-X with less vectors.
Signed-off-by: Michael S. Tsirkin <mst at redhat.com>
---
Hi Jesse,
This came up when I was adding MSI-X support to virtio pci driver,
which
2008 Mar 27
1
A faster way to compute finite-difference gradient of a scalar function of a large number of variables
Hi All,
I would like to compute the simple finite-difference approximation to the
gradient of a scalar function of a large number of variables (on the order
of 1000). Although a one-time computation using the following function
grad() is fast and simple enough, the overhead for repeated evaluation of
gradient in iterative schemes is quite significant. I was wondering whether
there are
2009 Sep 10
2
R 2.9.2 memory max - object vector size
Me:
Win XP
4 gig ram
R 2.9.2
library(foreign) # to read/write SPSS files
library(doBy) # for summaryBy
library(RODBC)
setwd("C:\\Documents and Settings\\............00909BR")
gc()
memory.limit(size=4000)
## PROBLEM:
I have memory limit problems. R and otherwise. My dataframes for
merging or subsetting are about 300k to 900k records.
I've had errors such as vector size too large.
2004 Mar 26
1
color.ramp in maptools
Dear list members,
I am trying to use the maptools library to display geographical data. At
the moment I have some trouble understanding how the " auxvar " variable
is supposed to be used in the plot.Map function.
I am using R Version 1.8.1 (2003-11-21) on Linux
Looking at the plot.Map function itself, I see that it calls a
color.ramp function (I am reporting only the relevant