Displaying 20 results from an estimated 4000 matches similar to: "Faster process for creating a matrix based on matrix element comparison"
2011 Nov 10
2
library(qpcR) cbind.na
I want to use function cbind.na at library(qpcR)
I install package qpcR and I can use functions such
m1 <- pcrfit(reps, 1, 2, l5)
> AICc(m1)
[1] -102.5843
but when i try cbind.na(1, 1:7) i take message
Error: could not find function "cbind.na"
Thanks
--
View this message in context: http://r.789695.n4.nabble.com/library-qpcR-cbind-na-tp4023339p4023339.html
Sent from the
2012 Dec 23
2
Select maximum subset
Suppose i have matrix z
id<-c(1,2,3,4,5)
a <- c(4, 3, 2, NA, 1)
b <- c(3, NA, 2, 7, 1)
c <-c(3, NA, NA, 7, NA)
z<- cbind(id,a, b,c)
id a b c
[1,] 1 4 3 3
[2,] 2 3 NA NA
[3,] 3 2 2 NA
[4,] 4 NA 7 7
[5,] 5 1 1 NA
I want to select those columns for which I have the smallest number of NA
In my example, these would be column1 and 2
since they give me
4 3
2 2
2010 Aug 26
2
Problems when Apply a script to a list
Dear users,
*******I have a function f to simulate data from a model (example below used
only to show my problems)
f<-function(n,mean1){
a<-matrix(rnorm(n, mean1 , sd = 1),ncol=5)
b<-matrix(runif(n),ncol=5)
data<-rbind(a,b)
out<-data
out}
*********I want to simulate 1000 datasets (here only 5) so I use
S<-list()
for (i in 1:5){
S[[i]]<-f(n=10,mean1=0)}
******I have a
2010 Aug 09
2
Results with name of dataset
I generate and save a dataset
For example
exampledata<-runif(10)
library("R.utils");
saveObject(exampledata, file="exampledata_9810.RData");
exampledata_9810<- loadObject("exampledata_9810.RData");
I use ex function to make alot of calculations using sink to export results
(in this simply example only summary of dataset)
ex<-function(data){
2004 Feb 18
1
Precache an entire OGG?
OK, thanks to the help of another forum user, I got my app compiled and working, but I now need to precache the OGG to memory. My current method somehow winds up in a loop or freezes the application. Here is y source for the decode/precache function. Why is it just freezing? I've let it run for about three minutes, thinking it was doing some heavy decoding, but I was wrong. Once this is
2011 Jul 10
1
Code Help
Am I missing a Package? I'm not sure why is won't read the functions. Any
help is much appreciated.
> PData = Data[,3:10]
> Spec = portfolioSpec()
Error: could not find function "portfolioSpec"
> setTargetReturn(Spec) = mean(colMeans(PData))
Error in setTargetReturn(Spec) = mean(colMeans(PData)) :
object 'Spec' not found
> Constraints =
2005 Jun 23
1
Stop Warnings for Invalid Factor Level, NAs generated?
How can I stop the following warning from occuring?
invalid factor level, NAs generated in: "[<-.factor"(`*tmp*`, iseq, value =
structure(1, .Label = "12", class = "factor"))
The Label messages are for "5", "8", "12" and "46". I want the NAs to be
generated as needed.
Is this causing R to slow down by generating the warning
2009 May 08
1
plm: plm.data vs pdata.frame
Hello,
I am trying to use the plm package for panel econometrics. I am just
trying to get started and load my data. It seems from most of the
sample documentation that I need to use the pdata.frame function to
get my data loaded. However, even after installing the "plm" package,
my R installation cannot find the function. I am trying to follow the
example in plmEN.pdf (
2005 Apr 29
2
Windows List of Folders?
For windows, how can I list only the folders in some folder?
I was thinking that dir() and file.info() with isdir==TRUE being something
that might work.
These folders or directories are numerically named with no dot extension
names or other characters. Typically, these are 3132, 3334, ...
Here is what I tried. The last line is where I need more work.
pData="C:/Myfiles/R/Data/"
setwd
2013 May 17
2
How could I see the source code of functions in an R package?
Hi,
How could I see the source code of functions in an R package?
If we type ?function_name , we will see documentations of the
function_name.
If we type function_name, is what returns just the source code? Could we
just save it in an .R file and modify as we want? However, it seems that
sometimes the source code is hidden (or stored elsewhere?) As an example,
could we see the source
2007 Aug 03
4
FW: Selecting undefined column of a data frame (was [BioC] read.phenoData vs read.AnnotatedDataFrame)
Hi all,
What are current methods people use in R to identify
mis-spelled column names when selecting columns
from a data frame?
Alice Johnson recently tackled this issue
(see [BioC] posting below).
Due to a mis-spelled column name ("FileName"
instead of "Filename") which produced no warning,
Alice spent a fair amount of time tracking down
this bug. With my fumbling fingers
2008 Feb 27
2
problem with creation of eSet
Hi,
I am having troubles with creating an eSet and would appreciate any help on
the following problem.
I am trying to create an eSet using the following code
pd <- read.table(file="pdata.txt",header =TRUE,row.names=1);
colnames(pd) <- c("type","tumor","time","id");
pdN <- list(type =
2006 Sep 15
2
Constant noise in the background in realtime data
Hi everyone,
Our team is working on a realtime voice communication application. We are using openAL 1.1 to capture the samples and then encode them using speex. On the remote machine we decode the samples and play them using openAL again. Capture and play formats for the samples is AL_FORMAT_MONO16 and frequency is 22050. we are using wide band encoding/decoding.
The encoding sample
2015 Feb 17
1
[PATCH] graph/nvc0: Fix engine pointer retrieval
From: Lauri Peltonen <lpeltonen at nvidia.com>
Other methods in this file suggest this is the correct way to retrieve
the engine pointer.
Signed-off-by: Lauri Peltonen <lpeltonen at nvidia.com>
Signed-off-by: Alexandre Courbot <acourbot at nvidia.com>
---
drm/nouveau/nvkm/engine/gr/gf100.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git
2003 Oct 01
1
question about predictions with linear models
Hi,
this question is probably very obvious but I just cant see where I
might be going wrong.
I'm using the lm() function to generate a linear model and then make
predictions using a different set of data.
To generate the model I do (tdata & pdata are matrices of observations
and parameters, tdepv, pdepv are response vectors)
x <- as.data.frame(tdata)
x$tdepv <- tdepv
2011 Sep 22
2
the opposite of lag() in panel data
Hi R-helpers
I want a function that performs the opposite of lag() with panel data.
I have transformed my data before with pdata.frame(mydata,
index=c("groupindex", “timeindex"))
And then I’ve done lag(mydata, -1) but it doesn’t work.
The error message was:
Error in rep(1, ak) : invalid ''times'' argument
Thank you in advance,
Cecília Carmo
2005 Mar 02
1
Text in lattice Graphics outside plot area
I am trying to get the same text printed on each page of a multi-page
series of bar charts. The text need to appear in the upper left-hand
corner of the page, outside of the plot area. A watermark might be the
closest analogy to what I am after
This is what I have so far:
PData <- na.omit(subset(TData,Matrix == "Product"))
barchart(AdjResND0 ~ reorder(Compound, Sort) | Label ,
2012 Jun 01
1
Converting a pdataframe into dataframe
> a <- data.frame(name=c(rep("a",5), rep("b",5)), year=c(1989:1993, 1989:1993), var=c(1:10))
> str(a)
> b <- pdata.frame(a, index=c("name","year"))
> str(b)
Now, I want to convert b into a data frame and have a structure
similar to a. How do I do that?
--
Apoorva Gupta
Consultant
National Institute of Public Finance and Policy
2008 Jul 06
2
lattice question
I'm creating a lattice barchart based off a pretty complicated data
structure. The barchart comes out quite nice ( thanks
to lattice ) but the problem is that the horizontal axis comes out all
scrunched because the barchart doesn't know that the intervals
of Var.1 are really "associated" with the conditioning variable Var.2.
Therefore, all the intervals of Var.1 are put on
2008 Aug 25
1
Specifying random effects distribution in glmer()
I'm trying to figure out how to carry out a Poisson regression fit to
longitudinal data with a gamma distribution with unknown shape and
scale parameters.
I've tried the 'lmer4' package's glmer() function, which fits the
Poisson regression using:
library('lme4')
fit5<- glmer(seizures ~ time + progabide + timeXprog +
offset(lnPeriod) + (1|id),
data=pdata,