Displaying 20 results from an estimated 3000 matches similar to: "Sparse matrix calculation"
2007 Sep 03
3
element wise opertation between a vector and a list
I want to try to get a result of element wise addition between a
vector and a list. It can be done with "for statement." In order to
reducing computing time, I have tried to avoid "for state." If anybody
give me an idea, I would apprecite it much.
for example, with a & b as below lines,
a<- list(c(1,3),c(1,2),c(2,3))
b<-c(10,20,30)
I would like to have a list (like
2006 Oct 26
1
A faster way to calculate Trace?
I want to know how to get trace of product of matrices **faster** when the matrices are really big. Unfortunately the matrices are not symmetric. If anybody know how to get the trace of it, please help me. An example is as below.
n <- 2500
a <- matrix(rnorm(n*n),n,n)
b <- matrix(rnorm(n*n),n,n)
tr1 <- sum(diag(a %*% b))
tr2 <- sum(diag(a %*% b %*% a %*% b))
Thanks,
Yongwan Chun
2006 Nov 14
2
Building R from source
Hello,
I was trying to build R from source on Windows XP. I installed software which are mentioned from the follow web page http://www.murdoch-sutherland.com/Rtools/ (Last accessed on Nov. 13th, 2006) . Unfortunately, I got error messages whenever I run 'make all recommended' without modifying 'MkRules' file. I have removed software and reinstalled them several times but I still
2004 Jan 26
1
Question about design matrix
Now, I am working with some design matrices. My problem is to set
"contrasts" option. Now I want to use "contr.sum" as the option, and it
works properly. However, this option sets the last element of a factor
as -1. For example, if I have a factor which has 5 elements and want to
use the "contr.sum" option, the 5th elements is always set to -1. I want
set -1 to other
2005 Dec 03
2
How to catch value
Dear R users:
I have a problem about catch the value from function.
I have following two functions (part):
fbolus1 <- function()
{.........
par<-data.frame(Parameter=c("kel","Vd"),Initial=c(0))
check(par)
.....}
check<-function(par)
{
if (par[ ,2] <= 0){
cat("\nEnter again (y/n) ?\n\n")
ans<-readline()
if (ans == "n" ){
2018 Mar 02
3
data analysis for partial two-by-two factorial design
Dear R users,
I need to analyze data generated from a partial two-by-two factorial design: two levels for drug A (yes, no), two levels for drug B (yes, no); however, data points are available only for three groups, no drugA/no drugB, yes drugA/no drugB, yes drugA/yes drug B, omitting the fourth group of no drugA/yes drugB. I think we can not investigate interaction between drug A and drug B,
2018 Mar 05
5
data analysis for partial two-by-two factorial design
David:
I believe your response on SO is incorrect. This is a standard OFAT (one
factor at a time) design, so that assuming additivity (no interactions),
the effects of drugA and drugB can be determined via the model you rejected:
For example, if baseline control (no drugs) has a response of 0, drugA has
an effect of 1, drugB has an effect of 2, and the effects are additive,
with no noise we
2001 Feb 19
2
How can I create qdisc, class, and filter inside the kernel?
Hi,
I am writing a kernel module which works with netfilter.
If a certain condition matches,
I want to create a qdisc, a class and a filter inside
the kernel module.
How can I create qdisc, class, and filter inside the kernel?
Thanks,
Byung-Gon Chun
_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com
2018 Mar 05
2
data analysis for partial two-by-two factorial design
Hi Bert,
I am very sorry to bother you again.
For the following question, as you suggested, I posted it in both Biostars website and stackexchange website, so far no reply.
I really hope that you can do me a great favor to share your points about how to explain the coefficients for drug A and drug B if run anova model (response variable = drug A + drug B). is it different from running three
2018 Mar 02
0
data analysis for partial two-by-two factorial design
This list provides help on R programming (see the posting guide linked
below for details on what is/is not considered on topic), and generally
avoids discussion of purely statistical issues, which is what your query
appears to be. The simple answer is yes, you can fit the model as
described, but you clearly need the off topic discussion as to what it
does or does not mean. For that, you might try
2018 Mar 05
0
data analysis for partial two-by-two factorial design
Hi Bert and David,
Thank you so much for willingness to spend some time on my problem!!! I have some statistical knowledge (going to get a master in applied statisitics), but do not have a chance to purse a phD for statistics, so I am always be careful before starting to do analysis and hope to gather supportive information from real statisticians.
Sorry that I did not tell more info about
2018 Apr 19
4
create multiple categorical variables in a data frame using a loop
Hi All,
I want to create a categorical variable, cat.pfoa, in the file of pfas.pheno (a data frame) based on log2pfoa values. I can do it using the following code.
pfas.pheno <-within(pfas.pheno, {cat.pfoa<-NA
cat.pfoa[pfas.pheno$log2pfoa <=quantile(pfas.pheno$log2pfoa,0.25, na.rm =T)]<-0
cat.pfoa[pfas.pheno$log2pfoa >=quantile(pfas.pheno$log2pfoa,0.75, na.rm =T)]<-2
2009 Jan 23
1
predict function problem for glmmPQL
Hi all,
I am using cross-validation to validate a generalized linear mixed effects model fitted using glmmPQL. i found that the predict function has a problem and i wonder if anyone has encountered the same problem?
glmm1 = glmmPQL(y~aX+b,random=~1|sample,data=traindata)
predict(glmm1,newdata=testdata,level=1,type="response")
gives me all "NA"s. it works for level=0 (the
2018 May 11
3
add one variable to a data frame
Hi Sarah,
Thank you so much!! I got your good ideas.
Ding
-----Original Message-----
From: Sarah Goslee [mailto:sarah.goslee at gmail.com]
Sent: Friday, May 11, 2018 11:40 AM
To: Ding, Yuan Chun
Cc: r-help mailing list
Subject: Re: [R] add one variable to a data frame
[Attention: This email came from an external source. Do not open attachments or click on links from unknown senders or
2005 Jul 05
14
issues in tcrules
Hi! This is another thread of "setting gateway in interfaces file" and
while i dont want to create any confusion here, i have decided to open
a new thread.(which mean Diamond King no longer a subscriber to
shorewall-users)
Actually, i turned out not to be the MARK issues. Something is missing
and i got this error instead :-
Setting up Accounting...
Creating Interface Chains...
2010 Sep 02
6
[PATCH]ioemu: fix altgr-insert behavior
When access to a Xen DomU (Linux) from a VNC client in Windows, alt-gr key is not working properly. When Alt + another key pressed, vncserver receives Altgr down, Altgr up and key down messages in order, that causes incorrect output.
With following patch, when vncerver receives key down message, it first check if the keysym needs altgr modifer, if it needs altgr modifier but altgr is not
2018 Mar 05
2
data analysis for partial two-by-two factorial design
But of course the whole point of additivity is to decompose the combined
effect as the sum of individual effects.
"Mislead" is a subjective judgment, so no comment. The explanation I
provided is standard. I used it for decades when I taught in industry.
Cheers,
Bert
Bert Gunter
"The trouble with having an open mind is that people keep coming along and
sticking things into
2018 Mar 05
0
data analysis for partial two-by-two factorial design
> On Mar 5, 2018, at 8:52 AM, Ding, Yuan Chun <ycding at coh.org> wrote:
>
> Hi Bert,
>
> I am very sorry to bother you again.
>
> For the following question, as you suggested, I posted it in both Biostars website and stackexchange website, so far no reply.
>
> I really hope that you can do me a great favor to share your points about how to explain the
2024 Jun 12
3
my R code worked well when running the first 1000 lines of R code
Hi R users,
The following code worked well to summarize four data groups in a dataframe for three variables (t_depth, t_alt_count, t_alt_ratio), 12 columns of summary, see attached.
However, after running another 2000 lines of R codes using functions from more than 10 other R libraries, then it only generated one column of summary.
Do you know why?
Thank you,
Yuan Chun Ding
summary_anno1148ft
2024 Jun 12
1
my R code worked well when running the first 1000 lines of R code
Hi Rui,
Thank you very much!
Yes, I verified using real data, it worked correctly as expected after adding tidyr:: to the pivot_longer function and dplyr:: to the group_by and summarize
Function.
I did not know how to assign the tidyr and dplyr to the three functions because I do not really understand well the three functions and just got the code from a google search.
I also tried your