search for: ehret

Displaying 20 results from an estimated 43 matches for "ehret".

2008 Jan 07
3
two graphs
...R community, I am plotting a histogram and would wish to display another variable of the same dataset in a very narrow heatmap just below the x-axis. Never mind the specifics of my task: How can I draw a second graph/image just below a first graph/image? Thank you! Georg. *************** Georg Ehret JHU Baltimore, MD 21043, USA [[alternative HTML version deleted]]
2009 Sep 20
4
running many different regressions
...to regress variable 1 separately on every other variable (2-100) in a linear regression using lm. There must be an easy way to do this without loops, but I have difficulties figuring this out... Can you please help? Thank you and best regards, Georg. ***************************************** Georg Ehret Johns Hopkins University Institute of Genetic Medicine [[alternative HTML version deleted]]
2007 Nov 26
3
determine the number of digits printed into graph with "text(...)"
...g a number in a graph using "text(...)" - see code below: "fraction" is my number. I wish to print only two digits of the number and struggle to do this... options(digit=3) does not work... Thank you for your suggestions! Cheers, Georg. ********************************** Georg Ehret Johns Hopkins Baltimore callrates<-read.table("RSG",col.names=c("variant","callrate")) hist(callrates[,2],breaks=100) fraction<-nrow(callrates[callrates$callrate>=0.9,])/nrow(callrates) hist(callrates[,2],breaks=100) text(0.4,500,"proportion of callrates...
2008 Apr 15
4
heavy graphs
...for output was pdf, but now I am getting file sizes of >30Mb that do not open well (or at all) in Adobe. Is there a way to reduce the resolution or get rid of overlaying datapoints? Any other idea is also warmly welcome! Thank you and wishing you a good day! Georg. ********************** Georg Ehret Johns Hopkins Baltimore - US [[alternative HTML version deleted]]
2010 Feb 24
3
"get" problem
...; get(t) Error in get(t) : object 'betaS$SBP' not found [I am trying to use the variable "t" in a loop to call many different objects, but the pasting together did not work and this simple example does not neither...] Thank you and best regards, Georg. ******************* Georg Ehret JHU Baltimore [[alternative HTML version deleted]]
2007 Oct 24
2
adding total row/column to table-command
...otal rows or column (sum over all rows or columns) when using table(data$1,data$2)... I do this now by adding the rows/columns and rbind() or cbind()... But there must be a more efficient way.... Could someone please give me a hint? Thank you! With my best regards, Georg. ******************* Georg Ehret Johns Hopkins Baltimore [[alternative HTML version deleted]]
2008 Apr 01
2
using a variable in a subset of a dataframe
...mmunity, I am using a dataset and would like to define new variables using a R variable: e.g. for (i in 1:10){ dataset$i<-something } But this is not the right way, I get only one variable in "dataset"... How can I change this? Thank you! Georg. ************************ Georg Ehret Johns Hopkins Baltimore, MD [[alternative HTML version deleted]]
2008 Apr 30
2
boxplots
...0,0,0,0,60,60,0,60,0,30,0) > data [1] 0 15 0 60 0 0 0 0 0 60 60 0 60 0 30 0 > boxplot(data) The boxplot has the first hinge and the mean-bar both at 0... Why is this the mean is clearly >0! Thanking you and wishing you an excellent day, Georg. *************************** Georg Ehret Johns Hopkins University Baltimore, US [[alternative HTML version deleted]]
2008 May 05
2
splitting a vector on comma
...llowing vector and I would like to split it on ",". How can I do this? > u [1] "160798191,160802762,160813395,160816017,160817873,160824082,160825247,160826925,160834272,160836257," Thank you in advance! With my best regards, Georg. ************************************ Georg Ehret Baltimore USA [[alternative HTML version deleted]]
2008 Jul 11
3
number of effective tests
...1389 0.3323826 ST 0.9554952 0.9101678 1.0000000 0.2756876 0.3031676 0.3501157 DR 0.2975892 0.3324979 0.2756876 1.0000000 0.9981733 0.9674843 DU 0.3211303 0.3331389 0.3031676 0.9981733 1.0000000 0.9977780 DT 0.3314694 0.3323826 0.3501157 0.9674843 0.9977780 1.0000000 ************************* Georg Ehret Johns Hopkins University Baltimore, US [[alternative HTML version deleted]]
2010 Jun 07
2
graphical representation of a correlation between 3 variables (~30 datapoints)
...re might be while also giving an idea of the values of the variables. I had done this with simple bargraphs for 6 datapoints in the past, but for 30 this is too much. Anyone a good idea how to get this job nicely done? Thanking you and best regards, Georg. ################################## Georg Ehret Johns Hopkins Baltimore [[alternative HTML version deleted]]
2008 Feb 21
2
coloring a graph left or right of an abline
Dear R community, I would wish to color the background of my histogram differently to the left and right of an abline... Can you please help? Thankin you, Georg. **************************** Georg Ehret JHU Baltimore - USA [[alternative HTML version deleted]]
2008 Apr 02
2
including a variable in another variable name
..."V" "W" "X" "Y" > paste("data_",a[1])<-c(1,2,3) Error in paste("data", a[1]) <- c(1, 2, 3) : target of assignment expands to non-language object Thank you and wishing you an excellent day! Georg. ********************** Georg Ehret Johns Hopkins Baltimore, MD USA [[alternative HTML version deleted]]
2009 Jan 20
2
plotting points with two colors
...s R, I am trying to plot a scatterplot in which the points (round) should have two colors: half red and half blue (if you want: two half solid circles put together. Can you please help me to realize this efficiently? Thank you, Best regards, Georg. *************************************** Georg Ehret Geneva University Hospital Geneva, Switzerland [[alternative HTML version deleted]]
2008 Jun 30
2
lm and NA
...d not succeed... Example: I would like to get "0,0,0,0,NA,NA": > a [1] 1 2 3 4 NA 9 > b [1] 3 4 5 6 7 NA > lm(a~b)$residuals 1 2 3 4 0 0 0 0 > lm(a~b,na.action=na.exclude)$residuals 1 2 3 4 0 0 0 0 Thank you and best regards! Georg. ************************** Georg Ehret Johns Hopkins Baltimore, USA [[alternative HTML version deleted]]
2008 Feb 29
2
printing tables to a pdf
Dear R community, I wish to print tables into a pdf file. How can this be done, adding headers and several tables to the same file? Thanking you for your attention, Georg. ***************************** Georg Ehret Johns Hopkins Baltimore - US [[alternative HTML version deleted]]
2008 Jun 26
2
density and jpeg
...ble with jpeg? I work on a Mac, R 2.7.0. > require(lattice) > jpeg("test.jpeg") > d[1:10] [1] 0.700218 0.700175 0.700357 0.700847 0.698286 0.701520 0.698158 0.699300 0.698819 [10] 0.698521 > densityplot(~d[1:10]) -> crash... Thank you! Georg. ********************* Georg Ehret Johns Hopkins Baltimore, MD USA [[alternative HTML version deleted]]
2008 Dec 06
1
assigning a new variable to multiple data frames
Dear R community, I am trying to assign a new variable (named "new") to multiple dataframes by a loop and do not succeed... Can you please help? Thank you and best regards, Georg Ehret. > c V1 V2 V3 V4 V5 V6 V7 V8 V9 V10 1 1 11 21 31 41 51 61 71 81 91 2 2 12 22 32 42 52 62 72 82 92 3 3 13 23 33 43 53 63 73 83 93 4 4 14 24 34 44 54 64 74 84 94 5 5 15 25 35 45 55 65 75 85 95 6 6 16 26 36 46 56 66 76 86 96 7 7 17 27 37 47 57 67 77 87 97 8 8 18 28 38 48...
2007 Oct 10
4
simple function with if -> lapply to dataframe
Dear R, I am writing a simple function to extract the sign of values and apply it to a data frame (see below). Whatever I do I get error-messages... What is wrong? Thanking you in advance, Cheers, Georg. *********************** Georg Ehret Institute of Genetic Medicine Johns Hopkins University Baltimore > extractsign<-function(x){ + if (x<0) a<--1 + else a<-1 + return (a) + } > a meanSBP meanSBP_tttcorr res_asb_SBP res_asb_SBP_tttcorr meanDBP meanDBP_tttco...
2010 Apr 04
2
calculating an interaction statistic from stratified data
...of variable x), stratified by sex for my dataset. I wish to calculate the sex-interaction effect (as beta&se) from these two stratified datasets. Is there a package to do this? If not, any advice how to do it manually? Thank you very much and best regards, Georg. ************************ Georg Ehret, JHU, Baltimore [[alternative HTML version deleted]]