similar to: How to "call" an object given a string?

Displaying 20 results from an estimated 4000 matches similar to: "How to "call" an object given a string?"

2013 Apr 29
3
all.vars for nested expressions
Dear R fellows, Assume I define a <- expression(fn+tp) sen <- expression(tp/a) Now I'd like to know, which variables are necessary for calculating sen all.vars(sen) This results in a vector c(tp,a). But I'd like all.vars to evaluate the sen-object down to the ground level, which would result in a vector c(tp,fn) (because a was defined as fn+tp). In other words, I'd like
2013 Apr 23
1
Frequency Block Chart
? stato filtrato un testo allegato il cui set di caratteri non era indicato... Nome: non disponibile URL: <https://stat.ethz.ch/pipermail/r-help/attachments/20130423/641d9950/attachment.pl>
2012 Nov 23
2
error in IF condition with factor evaluation
Cam anyone tell me why the condition x[i] == "DISCONECTED" looks like producing an NA instead of TRUE/FALSE I would like to rename "DISCONNECTED" those factors inside the variable "dataset$STATUS.x" that are named "DISCONECTED" thank you > summary(dataset$STATUS.x) ACTIVE DISCONECTED PENDING SUSPENDED TERMINATED 158869 169181
2013 Feb 04
2
reshape help
Dear R users - I have a list of patient identifiers and diagnoses from inpatient admissions. I would like to reorganize the list, presently in a long format to a wide format in reshape, but in the absence of a "time" element, I am uncertain how to do this - any help greatly appreciated. ID Dx A nausea A diabetes A kidney failure A heart attack A fever B fever B
2013 Feb 07
2
how to draw confidence interval lines of a fitted curve of polynominal regression
Hello, I drew a plot of weight and height of people and fitted it with a polynominal regression x^2. (using curve()) Now I would like to draw the confidence interval line for the fitted curve. Please kindly advise the code for the purpose. Thank you. Elaine [[alternative HTML version deleted]]
2013 Feb 06
2
merge 2 data.frames
Hello together, i have probably a easy question, but how can i sum 2 data.frames among each other. I have 2 data.frames which look like this one: Cu.No. place level 1 123 London A 2 111 Paris B Cu.No. place level 1 333 Berlin C 2 444 Madrid A and now i want this data in the same
2013 Feb 06
1
weighing proportion of rowSums in dataframe
Dear R-List, I am sure there must be a very simple way to do this - I just do not know how... This is what I want to do: #my dataframe df<-data.frame(id=c("x01","x02","x03","x04","x05","x06"),a=c(1,2,NA,4,5,6),b=c(2,4,6,8,10,NA),c=c(NA,3,9,12,NA,NA),sum=c(3,9,15,24,15,6))    id    a     b     c   sum 1 x01  1     2    NA   3 2
2013 Feb 12
3
subsetting data file by intoducing a second file
Hello, I have a very data matrix and I have a file which has the names that I need to subset. However I cannot manage to subset the main file. ANy idea? bg <- read.table (file.choose(), header=T, row.names) bg Otu00022 Otu00029 Otu00039 Otu00042 Otu00101 Otu00105 Otu00125 Otu00131 Otu00137 Otu00155 Otu00158 Otu00172 Otu00181 Otu00185 Otu00190 Otu00209 Otu00218 Gi20Jun11 0.001217
2013 Jan 28
2
R plot like candlestick
Hi all, I'm new on this list so I greet all. My question is: does exist in R a plot similar to candlestick plot but not based on xts (time series)? I have to plot a range of 4 value: for every item I have min value, max value and 2 intermediate values. I would like plot this like a candlestick, i.e. with a box between 2 intermediate values and 1 segment between box and min value and a segment
2013 Mar 28
2
how to search a list that contains multiple dissimilar vectors?
Dear All, This is a simple question, but I'm stumped about the simplest way to search a list object such as the following: This randomish snippet: n <- c(round(runif(round(runif(1,1,10),0),1,10),0)) alist <- new("list") for (i in seq_along(n)) { alist[[i]] <- c(round(runif(round(runif(1,1,10),0),1,10),0)) } names(alist) <- sample(letters[1:length(n)]) rm(n);c(alist)
2009 Aug 12
2
Superscripts in axis label
Hi All, I am trying to lable the y-axis on my scatterplot with the following: "Soil moisture content (m3m-3)" I am using the following coding for plotting the graph: plot(soilmoisture~gradientlevel, xlab="Levels of droughting gradient", ylab="Soil moisture content (m3m-3)", bty="l", font.main="2", pch=16, las=1, cex.lab="1.13") I have
2011 Oct 10
3
How to test if two C statistics are significantly different?
Hey all, In order to test if a marker is a risk factor, I built two models (using cox proportional hazard model). One model included this marker, and the other is not. Then, I use R package risksetROC to test how much predictive value did the marker add to this model. I get two C statistics by analyzing the linear predictors of the two models into this package. The qustion is How to test if two
2012 Feb 21
2
Using substitute in nested function calls
Dear List members, I really, like the feature that one can call R functions with mathematical expressions, e.g. curve(x^2, 0, 1) I wonder, how I can construct in a simple way a function like mycurve = function (expr) {...} such that that a call mycurve(x^2) has the same effect as the call curve(x^2, -100,100) Below is some code that works, but it seems much to complicated: it first
2012 Aug 02
6
Polygon shaded area
Hi all, I have two vectors (columns) called "efinal" and "efinal 2". I want to plot them on the same plot and "draw" a shaded area beween the two lines using function polygon I have tried all but I don ?t understand the polygon area, can you help me with examples? plot(efinal,type="l",ylim=range(min(efinal2),
2013 Feb 12
8
Help with functions as arguments
Hi, I am trying to write a function which defines some arguments, then uses those arguments as arguments of other function calls. It's a bit tricky to explain, so a simple example will have to suffice. I imagine this has a simple solution, but perusing through environments and other help lists has not helped. Suppose I have two functions: f1 = function(a) {     b = a + 1     b } f2 =
2013 Mar 04
3
urgent: question concerning data manipulation
Ein eingebundener Text mit undefiniertem Zeichensatz wurde abgetrennt. Name: nicht verf?gbar URL: <https://stat.ethz.ch/pipermail/r-help/attachments/20130304/62581e97/attachment.pl>
2011 Sep 19
3
Replace a for loop with a function
Hi all, I would like to replace the for loop in the code below with a function to improve the speed and to make the script more efficient. The loop creates a vector of integers (x) with the probability of f for each integer. The length of f is variable, but sums to 1. I tried to use a function with optional arguments which did not work. Here is the code: f <- data.matrix(c(0.5,0.15,0.35))
2011 Oct 22
7
"Plotting" text?
I noticed that the text() command adds text to a plot. Is there a way to either make the plot blank or add text to a "blank sheet". I would like to "plot" a page that contains just text, no plot lines, labels, etc. Suggestions? Kevin [[alternative HTML version deleted]]
2017 Dec 20
1
outlining (highlighting) pixels in ggplot2
I apprecaite the guidance Eik, that works great! I'm also wondering if you have any pointers for how I might stretch the color scale so that the max and min values are the same? Right now, the min is -0.064 and the max is something closer to 0.04. As you can see in what I sent, I tried adding: zmax1 = max(abs(m1)) ggplot(..., autoscale = FALSE, zmin = -1 * zmax1, zmax = zmax1) + ... to
2009 Jul 31
1
colored 3D pillar plots
hi, I'd like to do graphs like shown on the right panel on the following link: http://www.clinchem.org/cgi/content/full/53/8/1544/F1 (if link doesn't work see attached file) Any help and ideas highly appreciated, thanks in advance. Thomas von K?nel Human Genetics Uni Berne