Thank you very much! So, it appears that a grid has to be created for the
function to be used in stat_contour(). Thanks again for this example! It is
very helpful (and could be a worthwhile addition to geom_contour's help
example).
Btw, I was also trying to make the contour plot have shaded region
How about this (I'm showing it as a pipe because it's easier to read
that way):
library(magrittr)
"f 147/1315/587 2820/1320/587 3624/1321/587 1852/1322/587" %>%
strsplit(' ') %>%
unlist %>%
sub('^[^/]*/*','',.) %>%
sub('^[^/]*/*','',.) %>%
paste(collapse = ' ')
Georges Monette
--
Geo
library(mvtnorm) # you were misusing "require"... only use require if
you plan to
library(ggplot2) # test the return value and fail gracefully when the
package is missing
set.seed( 1234 )
xx <- data.frame( rmvt( 100, df = c( 13, 13 ) ) )
xx2 <- expand.grid( X1 = seq( -5, 5, 0.1 ) # all combinati
I seriously doubt that you are running the code I sent. What you have
probably done is to run your data, which has a different date format,
without changing the breaks or the date format arguments. As you
haven't provided any example that shows what you are doing, I can't
guess what the problem is.
Adjusted survival curves. (Sample code here:
https://rpubs.com/daspringate/survival )
Deep gratitude to Moderator/Admin!
At David Winsemius prompt, more elegant working code:Thanks, Ted :)
library(survival)
library(survminer)
df<-read.csv("F:/R/data/edgr-orig.csv", header = TRUE, sep = ";")
df2
Hi,
This is not a HW problem, sadly: I was last in a classroom 30 years ago,
and can no longer run off to the instructor :-(
I apologize but I cut and paste the wrong snippet earlier and made a typo
in doing so, but the result is the same with the more appropriate snippet.
require(mvtnorm)
requ
Hi Christofer,
A few comments.
1. Your experiment seems to show (I hope) that the issue may not be a shiny
issue.
If that is the case you can try to do things in a simpler setting,
such as a (non-shiny) R session,
say from the shell. i.e. start an interactive R session and enter the
load
Hi Eric, thanks for your further pointer.
I have put a line with load() function just as an illustration of a
bigger project of mine, which appears failing due to load() function
issue.
If I comment out that line my shiny app is working correctly locally
and globally.
otherwise, locally my shiny
> On Oct 9, 2017, at 6:03 AM, Big Floppy Dog wrote:
>
> Hello Ulrik,
>
> I apologize, but I can not see how to provide a pdf in place of the density
> function which calculates a KDE (that is, something from the dataset in the
> example). Can you please point to the specific example that might
On 09/10/2017 12:06 PM, William Dunlap wrote:
"(^| +)([^/ ]*/?){0,2}", with the first "*" replaced by "+" would be a
bit better.
Thanks! I think I actually need the *, because theoretically the b part
of the word could be empty, i.e. "a//c" would be legal and should become
"c".
Duncan Murd
On 09/10/2017 11:23 AM, Ulrik Stervbo wrote:
Hi Duncan,
why not split on / and take the correct elements? It is not as elegant
as regex but could do the trick.
Thanks for the suggestion. There are likely many thousands of lines of
data like the two real examples (which had about 5000 and 60
"(^| +)([^/ ]*/?){0,2}", with the first "*" replaced by "+" would be a bit
better.
Bill Dunlap
TIBCO Software
wdunlap tibco.com
On Mon, Oct 9, 2017 at 8:50 AM, William Dunlap wrote:
> > x <- "f 147/1315/587 2820/1320/587 3624/1321/587 1852/1322/587"
> > gsub("(^| *)([^/ ]*/?){0,2}", "\\1", x)
>
> x <- "f 147/1315/587 2820/1320/587 3624/1321/587 1852/1322/587"
> gsub("(^| *)([^/ ]*/?){0,2}", "\\1", x)
[1] " 587 587 587 587"
> y <- "aa aa/ aa/bb aa/bb/ aa/bb/cc aa/bb/cc/ aa/bb/cc/dd aa/bb/cc/dd/"
> gsub("(^| *)([^/ ]*/?){0,2}", "\\1", y)
[1] "cc cc/ cc/dd cc/dd/"
Bill Dunlap
TIBCO Sof
Dear R Users,
nofrills (0.2.0) has been published on CRAN:
https://cran.r-project.org/package=nofrills
This lightweight package provides `fn()`, a compact variation of the
usual syntax of function declaration, in order to support
tidyverse-style quasiquotation of a function’s arguments and body.
Hello Ulrik,
I apologize, but I can not see how to provide a pdf in place of the density
function which calculates a KDE (that is, something from the dataset in the
example). Can you please point to the specific example that might help?
Here is what I get:
require(mvtnorm)
require(ggplot2)
set.s
I'm getting all the rows as NA in Cscore and almost most of the
observation in R and F and M are also NA.
what can be the reason for this. also suggest me the appropriate solution.
On 9 October 2017 at 15:51, Jim Lemon wrote:
> Hi Hemant,
> Here is an example that might answer your questions. P
> On 9 Oct 2017, at 17:02 , Duncan Murdoch wrote:
>
> I have a file containing "words" like
>
>
> a
>
> a/b
>
> a/b/c
>
> where there may be multiple words on a line (separated by spaces). The a, b,
> and c strings can contain non-space, non-slash characters. I'd like to use
> gsub() to
Hi Duncan,
You can try this:
library(readr)
f <- function(s) {
t <- unlist(readr::tokenize(paste0(gsub(" ",",",s),"\n",collapse="")))
i <- grep("[a-zA-Z0-9]*/[a-zA-Z0-9]*/",t)
u <- sub("[a-zA-Z0-9]*/[a-zA-Z0-9]*/","",t[i])
paste0(u,collapse=" ")
}
f("f 147/1315/587 2820/1320/587 3624/1321
Hi Duncan,
why not split on / and take the correct elements? It is not as elegant as
regex but could do the trick.
Best,
Ulrik
On Mon, 9 Oct 2017 at 17:03 Duncan Murdoch wrote:
> I have a file containing "words" like
>
>
> a
>
> a/b
>
> a/b/c
>
> where there may be multiple words on a line (se
I have a file containing "words" like
a
a/b
a/b/c
where there may be multiple words on a line (separated by spaces). The
a, b, and c strings can contain non-space, non-slash characters. I'd
like to use gsub() to extract the c strings (which should be empty if
there are none).
A real exa
The R Foundation is looking for a volunteer to organize the collection
of contributed documentation for the R project. The collection is
currently hosted on CRAN at https://cran.r-project.org/other-docs.html
We want to move it off the CRAN web site.
We think that this task would be suitable for s
Hi Hemant,
Here is an example that might answer your questions. Please don't run
previous code as it might not work.
I define the break values as arguments to the function
(rbreaks,fbreaks,mbreaks) If you want the breaks to work, make sure that
they cover the range of the input values, otherwise y
Adjusted survival curves (Thanks to sample code:
https://rpubs.com/daspringate/survival )
Thanks to Moderator/Admin's Great Work! For a successful solution I used advice
that could be understood:
1. Peter Dalgaard: The code does not work, because the covariates are not
factors.
2. Jeff Newmill
Hi
> -Original Message-
> From: R-help [mailto:r-help-boun...@r-project.org] On Behalf Of Ludovico
> Piccolo
> Sent: Sunday, October 8, 2017 4:40 PM
> To: r-help@r-project.org
> Subject: [R] Manipulations with CO2 dataset on R
>
> Hi,
> I just started a new course this semester on R, I nev
Hi BFD,
?geom_contour() *does* have helpful examples. Your Google-foo is weak:
Searching for geom_contour brought me:
http://ggplot2.tidyverse.org/reference/geom_contour.html as the first
result.
HTH
Ulrik
On Mon, 9 Oct 2017 at 08:04 Big Floppy Dog wrote:
> Can someone please point me to an ex
Hi Christofer,
The shiny code you have written does not depend on loading the Dat.RData
file.
I commented out that line and ran your shiny app on my machine and it works
fine.
What happens if you comment out (or remove) the line
load("/home/ubuntu/Dat.RData)
Does your shiny app still fail? If
26 matches
Mail list logo