Displaying 20 results from an estimated 3000 matches similar to: "How to create arbitrary number of loops"
2012 Mar 29
1
How to create arbitrary number of loops in R
Dear R users,
I'm wondering how I can generate an arbitrary number of loops in R.
For instance, I can generate two "for" loops to get ICC among any two-way combination among 10 variables. Here is the code
n<-10
for (i in 1:(n-1))
{
for (j in (i+1):n)
{
icc(cbind(DATA[,i],DATA[,j]))
}
}
If I need three-way combination, then a code with three "for" loops will be:
2012 Aug 09
1
any recommendation for software about prediction analysis of gene expression data
Dear R users,
I have a microRNA (similar to microarray) data set with gene expressions and group variables. I'd like to perform (class) prediction analysis to see which genes or gene sets predict the group variable well.
I'm at the beginner level. Is there any free software in R or in point/click format that is commonly used and highly recommended?
I googled this topic and found
2017 Apr 06
3
abrt reported "imap killed by SIGBUS"
Hi sbr-services,
Could you give me some idea?
### abrt reported the error as below.
[root at cupop4 log]# abrt-cli list --since 1488267244 id
ad716dbfd3a68bbe0f055e32ebfe562f4f75df43
reason: imap killed by SIGBUS
time: Sun Mar 19 2017 10:58:27 AM JST
cmdline: dovecot/imap
package: dovecot-2.2.10-7.el7
uid: 80180 (acaa2325)
count: 2
Directory:
2014 Sep 23
1
Replication Failure
I have 2 DCs running 4.1.12 that have stopped replicating and are
producing these error messages:
from dc1:
Failed to commit objects:
WERR_GENERAL_FAILURE/NT_STATUS_INVALID_NETWORK_RESPONSE
[2014/09/23 10:43:35.530000, 0]
../source4/rpc_server/drsuapi/getncchanges.c:1646(dcesrv_drsuapi_DsGetNCChanges)
../source4/rpc_server/drsuapi/getncchanges.c:1646: DsGetNCChanges 2nd
replication on
2012 Oct 20
4
Error in integrate(integrand, 0, Inf) : non-finite function value
Dear R users,
When I run the code below, I get the error "Error in integrate(integrand, 0,
Inf) : non-finite function value". The code works if the function returns
only "sum(integ)". However, I want to add "cmh" to it. When I add "cmh" I
get that error. I can't figure out why this is happening because my
integrate function has nothing to do with
2009 Feb 09
2
R equivalent of SAS Cochran-Mantel-Haenszel tests?
In SAS, for a two-way (or 3-way, stratified) table, the CMH option in
SAS PROC FREQ gives
3 tests that take ordinality of the factors into account, for both
variables, just the column variable
or neither. Is there an equivalent in R?
The mantelhaen.test in stats gives something quite different (a test of
conditional independence for
*nominal* factors in a 3-way table).
e.g. I'd like to
2010 Jul 29
4
reading dates in Excel into R
I am reading dates in Excel2007 into R.
Here are the functions I used:
library(RODBC)
channel<-odbcConnectExcel2007("myfile.xlsx")
tmp<-sqlFetch(channel,"1",as.is=T)
The dates in myfile.xlsx are all in this format: mm/dd/yyyy. But when I read it to R, some columns look like "yyyy-mm-dd 00:00:00", some columns look like "yyyy-mm-dd", and some
2011 Jan 26
2
crash when using hazard.ratio.plot from rms package
Dear all,
I always encounter a crash when running hazard.ratio.plot from rms package with my predictor as a factor.
It works fine when the predictor is a continous score.
Anyone encounters this too? Is this a bug or something?
Thanks,
Lilian
[[alternative HTML version deleted]]
2007 Apr 15
1
Expression for pedices
I know that this maybe a trivial question. I am not able to plot pedices in graph axes.
Instead I am able to plot different math symbols :
XLABEL <- expression(paste(cmH,lim(f(x), x %->% 0),"O PEEP"))
works well
XLABEL <- expression(paste(cmH,[2],"O PEEP"))
is considered a wrong expression.
Thanks
2020 Apr 22
3
slow performance on company production server I need help
Hello Everyone,
Since rebooting my Centos 6.10 Openvz server "daisy" yesterday, I am
getting horrible system performance.? /var/log/messages is full of
HDIO_GET_IDENTITY failed for /dev/sdb.? The latest entries look like this:
Apr 22 08:51:32 daisy kernel: [141224.655699] CT: 1005: stopped
Apr 22 08:55:04 daisy ata_id[21513]: HDIO_GET_IDENTITY failed for '/dev/sdb'
Apr 22
2020 Apr 22
3
slow performance on company production server I need help
>> Hello Everyone,
>>
>> Since rebooting my Centos 6.10 Openvz server "daisy" yesterday, I am
>> getting horrible system performance.? /var/log/messages is full of
>> HDIO_GET_IDENTITY failed for /dev/sdb.? The latest entries look like
>> this:
>>
>> Apr 22 08:51:32 daisy kernel: [141224.655699] CT: 1005: stopped
>> Apr 22 08:55:04
2007 May 12
10
[Bug 10933] New: nouveau defaults to first graphics card in system even when xorg instructed differently
http://bugs.freedesktop.org/show_bug.cgi?id=10933
Summary: nouveau defaults to first graphics card in system even
when xorg instructed differently
Product: xorg
Version: 7.2
Platform: Other
OS/Version: Linux (All)
Status: NEW
Severity: normal
Priority: medium
Component: Driver/nouveau
2012 Jun 07
3
conditional statement to replace values in dataframe with NA
Hello and thanks for helping.
#some data
L3 <- LETTERS[1:3]
dat1 <- data.frame(cbind(x=1, y=rep(1:3,2), fac=sample(L3, 6, replace=TRUE)))
#When x==1 and y==1 I want to replace the 1 values with NA
#I can select the rows I want:
dat2<-subset(dat1,x==1 & y==1)
#replace the 1 with NA
dat2$x<-rep(NA,nrow(dat2)
dat2$y<-rep(NA,nrow(dat2)
#select the other rows and rbind
2010 Aug 25
4
degree C symbol in a function
Hello help,
I have changed around some graphing code and made it into a function.
Previously they y label of the axis was inserted as text in its own
layout box.
text(1,1, expression(~degree~C),cex=1)
This worked great and resulted in the symbol for degree.
In the function, I have changed it so:
text(1,1,paste(b_unit),cex=1)
and
b_unit<-expression(~degree~C)
This now inserts ~degree~C
2013 Dec 08
3
Why daisy() in cluster library failed to exclude NA when computing dissimilarity
Hi,
According to daisy function from cluster documentation, it can compute
dissimilarity when NA (missing) value(s) is present.
http://stat.ethz.ch/R-manual/R-devel/library/cluster/html/daisy.html
But why when I tried this code
library(cluster)
x <- c(1.115,NA,NA,0.971,NA)
y <- c(NA,1.006,NA,NA,0.645)
df <- as.data.frame(rbind(x,y))
daisy(df,metric="gower")
It gave this
2003 Dec 11
2
Cochran-Mantel-Haenszel problem
Hello,
I've tried to analyze some data with a CMH test. My 3 dimensional contingency
tables are 2x2xN where N is usually between 10 and 100.
The problem is that there may be 2 strata with opposite counts (the 2x2
contigency table for these are reversed), producing opposite odds ratios that
cancle out in the overall statistics. These opposite counts are very
important for my analysis, since
2004 Aug 12
2
error using daisy() in library(cluster). Bug?
Hi,
I'm using the cluster library to examine multivariate data.
The data come from a connection to a postgres database, and I did a short R
script to do the analisys. With the cluster version included in R1.8.0, daisy
worked well for my data, but now, when I call daisy, I obtain the following
messages:
---------
Error in if (any(sx == 0)) { : missing value where TRUE/FALSE needed
In
2011 Jun 16
1
Specify ID variable in daisy{cluster}
Hi All - I am using the daisy function from the cluster library to create a
dissimilarity matrix. I'm going to use that matrix to run a cluster
analysis. My participants are identified with the variable, hhid. However,
when I try to keep hhid in the dataset that I use to create the
dissimilarity matrix, daisy uses it to create the matrix rather than
ignoring it as an ID variable. I need to
2007 May 04
39
[Bug 10858] New: glxgears with mesa-git on PCI 10de0322 (NV34) GeForce FX 5200 crashes X
http://bugs.freedesktop.org/show_bug.cgi?id=10858
Summary: glxgears with mesa-git on PCI 10de0322 (NV34) GeForce FX
5200 crashes X
Product: xorg
Version: 7.2
Platform: x86 (IA32)
OS/Version: Linux (All)
Status: NEW
Severity: normal
Priority: medium
Component: Driver/nouveau
2011 Jan 27
2
identifying when one element of a row has a positive number
Hello,
I am not sure where to begin with this problem or what to search for
in r-help. I just don't know what to call this.
If I have 5 columns, the first 2 are the x,y, locations and the last
three are variables about those locations.
x<-seq(1860,1950,by=10)
y<-seq(-290,-200,by=10)
ANN<-c(3,0,0,0,1,0,1,1,0,0)
CTA<-c(0,1,0,0,0,0,1,0,0,2)
GLM<-c(0,0,2,0,0,0,0,1,0,0)