similar to: R- transform data frame into matrix

Displaying 20 results from an estimated 2000 matches similar to: "R- transform data frame into matrix"

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
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
2010 May 19
2
Joining two (or more) frequency tables
Hi, I am still new to R and have, in spite of searching all over, found no "understandable" documentation for how to join two (or more) frequency tables. Why would I want to do that and what do I mean by "joining" ? Let me try to explain: I have a diagnosis form that allows registration of up to three diagnosis codes on animals with birth defects, like this: father.id
2013 Feb 24
0
BA.plot with logarithmic axes (MethComp)
Dear R-helpers, I am trying to plot a Bland-Altman-Plot using the BA.plot function from the package MethComp. While there is a function to transform the values for analysis as shown in the snippet below, I would like to have logarithmic axes for display as well. The usual log = 'xy' does not work because of the properties of the y-asxis (positive and negative values). I am sure that
2008 Sep 16
0
Package implementing unconditional tests for comparing two binomials
Hello, I am looking for a package implementing unconditional tests for comparing two binomials (Barnard's test or derivatives). As I am looking for rare genotypes within my groups, my number of subjects in one of the cells of the 2x2 table is often 2-4 resulting in a too conservative result by Fisher's exact test due to the discrete sample space of the test statistic. As I want to use
2008 Dec 12
1
aggregate and median
Hello R-experts, I have a simple question: how do I aggregate data using the median function with na.rm = TRUE, i.e. aggregate(x, list(x$y, x$z), FUN = '????') I have tried 'median(x, na.rm = TRUE)' but that doesn't help. Any suggestions are very much appreciated, Thorsten
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 13
4
for loop
HI, You can do this in many ways: dat1<-read.table(text=" med1,med2,med3???? ?1,0,1?????? 0,1,1??? 2,0,0 ",sep=",",header=TRUE)?? #1st method library(reshape) dat2<-melt(dat1) dat3<-aggregate(dat2$value,by=list(dat2$variable),sum) ?colnames(dat3)<-c("name","sum(n11)") ?dat3 #? name sum(n11) #1 med1??????? 3 #2 med2??????? 1 #3 med3??????? 2
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
2004 Nov 29
3
systemfit - SUR
Hello to everyone, I have 2 problems and would be very pleased if anyone can help me: 1) When I use the package "systemfit" for SUR regressions, I get two different variance-covariance matrices when I firstly do the SUR regression ("The covariance matrix of the residuals used for estimation") and secondly do the OLS regressions. In the manual for "systemfit" on page
2003 Feb 20
2
is.numeric
Hi, I have a vector, which contains both strings and numbers, e.g. > foo <- c("str1",1234,"str2",0.9876) I want to know if a distinct element of the vector is a string or a number and took "is.numeric", but > is.numeric(foo[2]) [1] FALSE because R treats the numbers in a mixed vectors as strings: > foo [1] "str1" "1234"
2005 Feb 10
5
Annual cumulative sums from time series
Hello world, I am actually transferring a course in data management for students in biology, geography and agriculture from statistica to R - it works surprisingly well. If anyone is interested in my scratch/notepad (in German language), please see www.hydrology.uni-kiel.de/~schorsch/statistik/statistik_datenauswertung.pdf (pages 40-52) The dataset is:
2005 May 22
3
constraints
Is there a package in R that handles general linear (in-)equality + box constrained optimization? If it is not there, could anyone advise me which way to go? And/or point me to packages that solve these problems partially? best, ingmar -- Ingmar Visser Department of Psychology, University of Amsterdam Roetersstraat 15, 1018 WB Amsterdam The Netherlands http://users.fmg.uva.nl/ivisser/ tel:
2004 Nov 01
5
make apply() return a list
Hi, I have a dataframe (say myData) and want to get a list (say myList) that contains a matrix for each row of the dataframe myData. These matrices are calculated based on the corresponding row of myData. Using a for()-loop to do this is very slow. Thus, I tried to use apply(). However, afaik apply() does only return a list if the matrices have different dimensions, while my matrices have
2005 Apr 22
4
Bug in Version 2010 (PR#7807)
Dr. Michael Breuer 22.04.05 ?kologiezentrum der Universit?t Kiel Olshausenstra?e 75 24118 Kiel Dear Ladies and Sirs, After updating the R-Windows-program (binary) by the latest version (2010), the R-Scripts that I want to execute are not shown in the File-Window anymore. In the former version it worked
2004 Nov 16
3
How to remove x, y labels from a plot
Hi there, I need to plot an illustrative figure without ticks, x, y labels in R. I managed to get the ticks removed, but had no luck with x, y labels. Any suggestions would be much appreciated. Jin Li [[alternative HTML version deleted]]
2007 Oct 30
2
Splitting up the micEcon package?
Dear R Users: The functions of our "micEcon" package [1,2] can be subdivided into three categories: - microeconomic demand and firm models - sample selection models (mainly selection()) - routines for (likelihood) maximisation (e.g. maxLik(), maxNR(), maxBHHH()) (mainly used for ML estimation of sample selection models) Although sample selection models are often used in
2005 Apr 26
2
writing a data frame in excel format
Hello I know how read a file in excel format into a R data frame using the RODBC library, but I don't know how write a R data frame in excel format. I don't understand the instructions from RODBC user manual. To read an excel file I use. library(RODBC); conex<-odbcConnectExcel("fis_quim.xls"); sqlTables(conex); data<-sqlFetch(conex,"hoja1"); Suppose I
2006 Sep 28
2
R CMD build when the package name is different from the directory name
Hi, I was really happy when I saw that in R version 2.3.0 "R CMD check" works for packages whose package name is different from the directory name in which it is located (see http://cran.r-project.org/src/base/NEWS). Now, I can have branches of my packages in directories like "[...]/branches/<version number>/", while I had to use "[...]/branches/<version