Displaying 20 results from an estimated 900 matches similar to: "for loop"
2010 Nov 29
4
subset
?Hi:
I always use subset the same way but now is returning 0 rows.
What's wrong with the way I am subsetting?
library(ggplot2)
structure(list(first = c(38.2086, 43.1768, 43.146, 41.8044, 42.4232,
46.3646, 38.0813, 40.0745, 40.4889, 38.6246, 40.2826, 41.6056,
34.5353, 40.0768), second = c(43.3295, 42.4326, 38.8994, 37.0894,
42.3218, 46.1726, 39.1206, 41.2072, 42.4874, 40.2657, 38.7766,
2012 Nov 12
1
reshape
Hi,
I have a R output that looks as follow:
Rad:0
Rad1:2
Rad3:3
I want to make a new matrix that looks like : sample size is 2400
Variable n11 n12
Rad 0 2400-0=2400
Rad1 2 2400-2
Rad3 3 2400-3
Thanks a lot for your time and help:)
Best,Farnoosh Sheikhi
[[alternative HTML version deleted]]
2012 Oct 15
1
library(rmeta)
Hello,
I have a data with following format:
Predictors n11 n12 n21 n22 Odds.Ratio log.ratio se.log.odds.
1 ProcOR respirato
2 ProcVaric vein
3 DiagCardiac anom
4 DiagAllergy
5 DiagOth skin dx
6 DiagGastritis
I want to plot odds ratio by command: forestplot in rmeta library, but I get the following error constantly.
Error in
2003 Aug 30
3
fisher.test() gives wrong confidence interval (PR#4019)
The problem occurs when the sample odds ratio is Inf, such as in the
following example. Given the fact that both upper bounds of the two 95%
confidence intervals are Inf, I would have expected that the two lower
bounds be equal, but they aren't.
x <- matrix(c(9,4,0,2),2,2)
x
# [,1] [,2]
#[1,] 9 0
#[2,] 4 2
rbind("two.sided.95CI"=fisher.test(x)$conf.int,
2009 Oct 16
1
How odds ratio is computed in fisher.test()?
I'm wondering how odds ratio is computed. I thought that it is
(n11/n12)/(n21/n22), but it is not what fisher.test() computes. Could
somebody let me know?
> n11=3
> n12=1
> n21=1
> n22=3
>
> n1_=n11+n12
> n2_=n21+n22
>
> n_1=n11+n21
> n_2=n12+n22
>
> x=rbind(c(n11,n12),c(n21,n22))
>
> threshold=dhyper(n11,n1_,n2_,n_1)
>
2020 Oct 09
1
Aide pour finaliser ce code
Hello.
Here is my R code. I used the functional data . Now I need to use the
functional data by applying the kernels instead of the xi, yi functions.
Bonjour.
Voici mon code en R . J'ai utiliser les donn?es fonctionnelles . Maintenant
j'ai besoin d'utiliser les donn?es fonctionnelles en appliquant les noyaux
? la place des fontions xi, yi
library(MASS)
2013 Jun 24
1
help needed with printing multiple arguments as vectors, not matrices
**
I am using the following way to get p-values from fiser exact test.
However, I do need to print for each pair the values "n00, n01, n10, n11".
How can I print that as a table and not a matrix as below along with the
p-value? Any help will be greatly appreciated
fish <- function(y, x) {n00 = sum((1-x)*(1-y)); n01 = sum((1-x)*y);
n10 = sum(x*(1-y)); n11 = sum(x*y); a =
2020 Oct 10
3
Please need help to finalize my code
Good evening dear administrators,
It is with pleasure that I am writing to you to ask for help to finalize my
R programming algorithm.
Indeed, I attach this note to my code which deals with a case of
independence test statistic . My request is to introduce the kernels using
the functional data for this same code that I am sending you. So I list the
lines for which we need to introduce the
2008 Aug 10
1
Macmilan dictionary gives me an error
Hi!
As the subject line says, Macmillan dictionary gives me an error msg:
Code:
wine: Unhandled page fault on read access to 0x003ad6a1 at address 0x36a2e5 (thread 0009), starting debugger...
Unhandled exception: page fault on read access to 0x003ad6a1 in 32-bit code (0x0036a2e5).
Register dump:
CS:0073 SS:007b DS:007b ES:007b FS:0033 GS:003b
EIP:0036a2e5 ESP:0032feb4 EBP:0032febc
2020 Oct 13
1
Please need help to finalize my code
Hm. Google tells me that kernel function is in stats package which comes with base installation and is invoked when you start R.
search()
[1] ".GlobalEnv" "package:stats" "package:graphics"
[4] "package:grDevices" "package:utils" "package:datasets"
[7] "package:methods" "Autoloads"
2020 Oct 13
0
Please need help to finalize my code
What do you *mean* "when you want to use the kernels".
WHICH kernels?
Use to do WHAT?
In your browser, visit cran.r-project.org
then select "Packages" from the list on the left.
Then pick the alphabetic list.
Now search for 'kernel'.
You will find dozens of matches.
On Wed, 14 Oct 2020 at 05:15, PIKAL Petr <petr.pikal at precheza.cz> wrote:
> Hm. Google tells
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
2010 Nov 18
3
Plotting number of patients at risk below survival curve
Dear list,
does anyone know of a R-package that has implemented the increasingly popular
inclusion of the number of patients at risk below Kaplan-Meier curves like in
http://bloodjournal.hematologylibrary.org/content/vol116/issue19/images/large/zh89991058760001.jpeg
any hint (or negative answer) is much appreciated.
Thanks
Thorsten
--
Thorsten Raff
2nd Medical Department,
University
2011 Jul 31
2
XML and odfWeave
Dear R-helpers,
this is just a notice to inform everyone that the current versions of XML and
odfWeave don't seem to be playing nice with each other.
Since it took me quite some time to figure that out, I thought that I let you
know. In my case it helped to install an older version of XML but your
mileage of course may vary.
Best regards
Thorsten
--
Thorsten Raff
2nd Medical
2008 Nov 12
3
R- transform data frame into matrix
Hello
I have the problem that I want to transform a dataframe as generated by
diagnosis <- rep(diagnosis[1:3], 3)
marker <- gl(3,3)
values <- rnorm(9)
dataframe <- cbind(diagnosis, marker, values)
dataframe <- dataframe[c(1:5, 7:9), ]
into a matrix where levels(diagnosis) is indicating the rows of the matrix,
levels(marker) the columns and values are the actual content of the
2002 May 21
2
using axis with newline characters
Wondering if I missed anything or if that's a problem with R:
I want to have many x axis tickmarks and labels such that it makes sense to put them on multiple "lines".
The newline character seems to be ignored though for axis labels:
plot(1:33, axes=F)
axis(1, 9, 9)
axis(1, 11, "\n11")
axis(1)
# whereas
title("one\ntwo")
works as I expect it to work.
In
2011 Nov 30
1
Nomogram with stratified cph in rms package, how to get failure probability
Hello,
I am using Dr. Harrell's rms package to make a nomogram. I was able to make
a beautiful one. However, I want to change 5-year survival probability to
5-year failure probability.
I couldn?t get hazard rate from Hazard(f1) because I used cph for the model.
Here is my code:
library(rms)
f1 <- cph(Surv(retime,dfs) ~
age+her2+t_stage+n_stage+er+grade+cytcyt+Cyt_PCDK2 , data=data11,
2012 Mar 27
1
survplot function
Dear R-helpers
I am wondering if there is an option to the survplot function in the design
package that allows for drawing Kaplan-Meier plots starting from 0 instead of
1, similar like fun = 'event' in the standard plotting function used on a
survfit object.
I apologize in advance for having missed any obvious informational sources but
I really didn't find anything in the
2013 Jan 18
3
longitudinal study
Hello R user,
I have a data set from a longitudinal study ( sample below) where
subjects are followed over time. Second column (status) contains info
about if subject is dead or still in the study and third column is
time measured in the week. Here is what I need: if status is not dead
or unknown take the last week, if status is dead or unknown I need to
have corresponding week.
Desired resulst:
2011 Jan 03
0
Macmillan dictionary (gold App) fails first run
Hello
I'm trying to get Macmillan Dictionary 2nd ed to work
http://appdb.winehq.org/objectManager.php?sClass=version&iId=15607
Under self compiled Wine 1.3.10 on Debian Lenny (I do not know of
(packaged wine) deb publicly available)
It is told to be a Gold app so maybe it'll work somehow.
Installs ok
- I followed the instruction NOT to install QuickFind and
- I Installed the