similar to: Throwing expressions around

Displaying 20 results from an estimated 40000 matches similar to: "Throwing expressions around"

2007 Feb 19
3
summary polr
Hi all, I have a problem to estimate Std. Error and t-value by ?polr? in library Mass. They result from the summary of a polr object. I can obtain them working in the R environment with the following statements: temp <- polr(formula = formula1, data = data1) coeff <- summary(temp), but when the above statements are enclosed in a function, summary reports the following error:
2010 Oct 19
2
nls & optimize
Hi all, I'm plotting to get the intersection value of three curves. Defining the x-axis as dsm, the following code works; dsm = c(800,600,NA,525,NA,450,400,NA,NA,NA,0) s3 = seq(0.05,1.05,0.1) plot(dsm,s3,col="blue",las=1,ylab="fraction",xlab="distance (km)") fc <- function(x,a,b){a*exp(-b*x)} fm <- nls(s3~fc(dsm,a,b),start=c(a=1,b=0)) co <- coef(fm)
2011 Jan 03
3
optimize
Hi all, I'm trying to get the value of y when x=203 by using the intersect of three curves. The horizontal curve does not meet with the other two. How can I rectify the code below? Thanks Muhammad ts <- 1:10 dd <- 10:1 ts <- seq(200,209,1) dd <- c(NA,NA,NA,NA,1.87,1.83,1.86,NA,1.95,1.96) plot(ts,dd,ylim=c(1.5,2)) abline(lm(dd~ts),col="blue",lty=2)
2004 Dec 02
2
Drawing a rectangle around a barplot()
Hi I want to draw a rectangle behind a barplot such that it highlights those particular bars from the rest of the plot. I have figured out how to draw a barplot(), and then how to draw a rectangle of the correct shape and size (using rect()), but when I use rect() it draws over the top of the bars, and then when I re-draw the bars, it draws with a white background, thus eliminating my rectangle!
2010 Dec 17
1
help with function
Hello List I'm moving this over from the bioC list as, although the problem I'm working on is biological, the current bottle neck is my poor understanding of R. I wonder if someone would help me with the following function. cumulMetric <- function(deMirPresGenes, deMirs){ ??? #need to match position of each miR in deMirPresGenes with its FC to form a vector of FC in correct order ?
2016 Feb 29
3
Source code of early S versions
On Mon, Feb 29, 2016 at 6:17 PM, John Chambers <jmc at r-project.org> wrote: > The Wikipedia statement may be a bit misleading. > > S was never open source. Source versions would only have been available with a nondisclosure agreement, and relatively few copies would have been distributed in source. There was a small but valuable "beta test" network, mainly university
2010 Sep 06
3
What can make G.729a codec hostid change?
After upgrading my small test system from Debian Etch->Lenny via a complete reinstall, I find my g729 hostid has changed. Same machine, same CPU, same NIC! It doesn't seem reasonable that I have to burn my one "no-hassle" re-registration for a simple OS upgrade. The README only says that hostid is based on MAC addresses of all NICs, but that doesn't seem to be true. Does
2004 Aug 12
9
Giving a first good impression of R to Social Scientists
Dear all, in the coming Winter Semester, I will be a teaching assistant for a course in Survival Analysis. My job will be to do the lab sessions. The software used for these lab sessions will be R. Most of the students have a background in social sciences and the only stats package they used so far is most likely SPSS. So I assume they might be quite surprised the first time they see R
2007 Mar 22
1
non-linear curve fitting
Hi list, I have a little curve fitting problem. I would like to fit a sigmoid curve to my data using the following equation: f(x) = 1/(1 + exp(-(x-c)*b)) (or any other form for that matter) Where x is the distance/location within the dataframe, c is the shift of the curve across the dataframe and b is the steepness of the curve. I've been playing with glm() and glm.fit() but without
2006 Nov 23
3
Conversion from expression to numeric
Dear All I am trying to convert from the type "expression" to the type "numeric". The following works: > x <- expression(6.2) > as.numeric(as.character(x)) [1] 6.2 However, the following does not work: > x <- expression(62/100) > as.numeric(as.character(x)) [1] NA Warning message: NAs introduced by coercion Any idea about how to deal with the second case?
2004 Jun 29
7
anti-R vitriol
A colleague is receiving some data from another person. That person reads the data in SAS and it takes 30s and uses 64k RAM. That person then tries to read the data in R and it takes 10 minutes and uses a gigabyte of RAM. Person then goes on to say: It's not that I think SAS is such great software, it's not. But I really hate badly designed software. R is designed by
2009 Apr 25
5
Out of memory issue
Hi all, I am trying to run some plots on data, but when loading he CSV data file R is stopping and I am getting an out of memory error. Anyway to tweak this somehow to get it to run? Using WinXP with 4 GB RAM Tnx Bruce
2019 Feb 02
5
Runnable R packages
I don't think anyone denies that you *could* make an EXE to do all that. The discussion is on *how easy* it should be to create a single file that contains an initial "main" function plus a set of bundled code (potentially as a package) and which when run will install its package code (which is contained in itself, its not in a repo), install dependencies, and run the main()
2018 Jul 26
2
Possible bug: R --slave --interactive stdin echo on Linux when stdin is a fifo
On Thu, Jul 26, 2018 at 12:22 AM, G?bor Cs?rdi <csardi.gabor at gmail.com> wrote: > I am trying to control a background R session, connected via a fifo / > named pipe. Is the fifo significant here? If I read the same R code from a file via `<` I get the input echoed (R 3.4.4, Ubuntu). Barry
2005 Apr 11
1
glm family=binomial logistic sigmoid curve problem
I'm trying to plot an extrapolated logistic sigmoid curve using glm(..., family=binomial) as follows, but neither the fitted() points or the predict()ed curve are plotting correctly: > year <- c(2003+(6/12), 2004+(2/12), 2004+(10/12), 2005+(4/12)) > percent <- c(0.31, 0.43, 0.47, 0.50) > plot(year, percent, xlim=c(2003, 2007), ylim=c(0, 1)) > lm <- lm(percent ~ year)
2010 Mar 26
3
NA values in indexing
If you index a vector with a vector that has NA in it, you get NA back: > x=101:107 > x[c(NA,4,NA)] [1] NA 104 NA > x[c(4,NA)] [1] 104 NA All well and good. ?"[" says, under NAs in indexing: When extracting, a numerical, logical or character ?NA? index picks an unknown element and so returns ?NA? in the corresponding element of a logical, integer,
2011 Aug 15
2
area under the curve
HI there, I have been trying to use a code posted on R help to be able to calculate area under the curve for complicated data points and there seems to be an issue with the code: no "b" object found. I am not a good R user and can''t find were the problem is. Any help? Thanks!! This is the code ( as a test run I gave it this info because I know the answer: x<-seq(1:50)
2012 Feb 21
6
Jazzing up the Task Views index page
A little while ago here we had a short discussion about Task Views - I think ignited by someone saying 'how many times do I have to say "have you read the Optimisation Task View?"?' and I poured some fuel on that fire by saying "Task Views" was a stupid name. Anyway, I did say that Task Views were rather brilliant, but were let down by their hidden position on the R
2008 Aug 11
3
tkentry that exits after RETURN?
I can set up an entry widget (thanks to an old post by Barry Rowlingson) that gets a password and exits when the user clicks on the "OK" button. Anyone have any clever ideas for returning/ destroying the window when the user types a carriage return/ENTER in the text window? I've messed around a little with validate, validatecommand, but don't see any obvious way to do it ...
2007 Aug 01
3
"Cut marks" on a plot's y-axis to indicate it is a truncated axis
Hi, I've plotted a Kaplan-Meier curve but the curves only range from 0.7 to 1 on the y-axis. Therefore I have used: - ylim=c(0.7,1) [although I think convention dictates that you plot 0.5 to 1 to show the median? A few papers I've read have done this]?? BUT, I would like a symbol like // (but rotated 90 degrees) to indicate that the y-axis has been truncated. I'd need to be able to