similar to: Is there an equivalent of "echo"

Displaying 20 results from an estimated 10000 matches similar to: "Is there an equivalent of "echo""

2009 Aug 19
3
PowerCut Killed R - is my code retrievable?
I've been tweaking code for several days on and off in R, cut and pasting in from a text editor (I just leave them open all the time). I think I got something that was usable but then a powersurge tripped the fuses and unfortunately the machine I was working on doesn't have a UPS. Does R hold the command data in cache some place? I've purposefully not opened R since the crash so
2010 May 25
1
Non-unique Values
I might be missing something really obvious, but is there an easy way to locate all non-unique values in a data frame? Example mydata <- numeric() mydata$id <- 0:8 mydata$unique <- c(1:5, 1:4) mydata$result <- c(1:3, 1:3, 1:3) > mydata $id [1] 0 1 2 3 4 5 6 7 8 $unique [1] 1 2 3 4 5 1 2 3 4 $result [1] 1 2 3 1 2 3 1 2 3 What I want to to be able to get some form of data output
2011 Oct 31
5
Kaplan Meier - not for dates
I have some data which is censored and I want to determine the median. Its actually cost data for a cohort of patients, many of whom are still on treatment and so are censored. I can do the same sort of analysis for a survival curve and get the median survival... ...but can I just use the survival curve functions to plot an X axis that is $ rather than date? If not is there some other way to
2010 Feb 21
1
odfWeave - merged table cells, and adding information like totals and p-values
I'm hoping I'm missing some (probably fundamental basic process) which might make my life easier! Lets assume I have a 3 column table summarizing results from a trial from three arms (Arm A, B and C). For each arm there will be a number of pieces of information to report. The simplest example might be to compare this to the demographic comparisons often seen in clinical traisl where you
2013 Apr 29
3
Comparing two different 'survival' events for the same subject using survdiff?
I have a dataset which for the sake of simplicity has two endpoints. We would like to test if two different end-points have the same eventual meaning. To try and take an example that people might understand better: Lets assume we had a group of subjects who all received a treatment. The could stop treatment for any reason (side effects, treatment stops working etc). Getting that data is very
2017 Jun 01
3
odfWeave - A loop of the "same" data
Before I go and do this another way - can I check if anyone has a way of looping through data in odfWeave (or possibly sweave) to do a repeating analysis on subsets of data? For simplicity lets use mtcars dataset in R to explain. Dataset looks like this: > mtcars mpg cyl disp hp drat wt ... Mazda RX4 21.0 6 160 110 3.90 2.62 ... Mazda RX4 Wag 21.0 6 160 110 3.90
2009 Aug 06
1
Using 'field names' of a data.frame in a function
I may be doing this wrong! but I have a function which I have simplified a lot below. I want to pass some 'field names' of a data-frame to the function for it to then do some manipulation of. Here's my code: #build a simple dataset mydataset = data.frame (
2012 Jun 19
2
matchit - can I weight the parameters?
This may be a really obvious question but I just can't figure out how to do it. I have a small dataset that I am trying to compare to some controls. It is essential that the controls are matched on Cancer Stage (a numerical factor between 1 and 4), and then ideally on Age (integer), Gender (factor), Performance Status(factor). I'm using matchit to try and do this, but it seems to give
2009 Jul 28
5
Summarising Data for Forrest Plots
I tried to post this a few times last week and it seems to have got stuck somehow so I'm trying from a different email in the hope that works. If somehow this has appeared on the list 20 tiems and I never saw any of them I apologize ;-) I'm basically an R-newbie. But I am VERY computer literate. But this has me stumped... All the examples for using the rmeta package to create a
2023 Dec 30
1
Help request: Parsing docx files for key words and appending to a spreadsheet
Thanks Ivan and Calum I continue to appreciate your support. Calum, I entered the code snippet you provided, and it returns 'file missing'. Looking at this, while the object 'full_filename' exists, what is happening is that the path from getwd() is being appended to the title of the article, but without the '/' between the end of the path name (here 'TEST' and
2023 Dec 29
1
Help request: Parsing docx files for key words and appending to a spreadsheet
help(read_docx) says that the function only imports one docx file. In > order to read multiple files, use a for loop or the lapply function. > I told you people will suggest better ways to loop!! > > docx_summary(read_docx("Now they want us to charge our electric cars > from litter bins.docx")) should work. > Ivan thanks for spotting my fail! Since the OP is new to
2009 Sep 08
1
Obtaining value of median survival for survfit function to use in calculation
Hi, I'm sure this should be simple but I can't figure it out! I want to get the median survival calculated by the survfit function and use the value rather than just be able to print it. Something like this: library(survival) data(lung) lung.byPS = survfit(Surv (time, status) ~ ph.ecog, data=lung) # lung.byPS Call: survfit(formula = Surv(time, status) ~ ph.ecog, data = lung) 1
2009 Dec 18
1
?OT: Probabilistic Simulation
Sorry this may well be defined as Off Topic. I apologize in advance. I am interested in performing what I think would be a probabilistic sensitivity simulation. I've done some crude ones before in excel but I'm wondering if R can help me do it more effectively? I have a set of theoretical variables for simplicity lets use (what I think) is an easier example: I have a peg and a hole
2017 Jun 01
0
odfWeave - A loop of the "same" data
On Thu, 1 Jun 2017, POLWART, Calum (COUNTY DURHAM AND DARLINGTON NHS FOUNDATION TRUST) via R-help wrote: > Before I go and do this another way - can I check if anyone has a way of > looping through data in odfWeave (or possibly sweave) to do a repeating > analysis on subsets of data? > > For simplicity lets use mtcars dataset in R to explain. Dataset looks like this: >
2023 Dec 30
1
Help request: Parsing docx files for key words and appending to a spreadsheet
full_filename <- paste(filepath, filename,sep="/") On Sat, Dec 30, 2023 at 1:45?PM Andy <phaedrusv at gmail.com> wrote: > Thanks Ivan and Calum > > I continue to appreciate your support. > > Calum, I entered the code snippet you provided, and it returns 'file > missing'. Looking at this, while the object 'full_filename' exists, what > is
2023 Dec 30
2
Help request: Parsing docx files for key words and appending to a spreadsheet
Hi Eric Thanks for that. That seems to fix one problem (the lack of a separator), but introduces a new one when I complete the function Calum proposed:Error in docx_summary() : argument "x" is missing, with no default The whole code so far looks like this: # Load libraries library(tcltk) library(tidyverse) library(officer) filepath <- setwd(tk_choose.dir()) filename <-
2023 Dec 30
3
Help request: Parsing docx files for key words and appending to a spreadsheet
An update: Running this block of code: # Load libraries library(tcltk) library(tidyverse) library(officer) filepath <- setwd(tk_choose.dir()) filename <- "Now they want us to charge our electric cars from litter bins.docx" #full_filename <- paste0(filepath, filename) full_filename <- paste(filepath, filename, sep="/") if (!file.exists(full_filename)) { ?
2024 Feb 12
1
Avoiding Delete key function as 'Quit R' in Rterm when there are no characters in cursor line
On 2/9/24 21:39, Iago Gin? V?zquez wrote: > Duncan, do you think it's worth to comment this in R-devel list? Duncan filed a bug report via R bugzilla (thanks). There is no way to disable this functionality and it has existed for very long time, I tested that at least in R 3.0. Optionally ending the session was I believe intentional with Ctrl+D, when the input is empty, and it is also
2023 Nov 04
2
I need to create new variables based on two numeric variables and one dichotomize conditional category variables.
I might have factored the gender. I'm not sure it would in any way be quicker. But might be to some extent easier to develop variations of. And is sort of what factors should be doing... # make dummy data gender <- c("Male", "Female", "Male", "Female") WC <- c(70,60,75,65) TG <- c(0.9, 1.1, 1.2, 1.0) myDf <- data.frame( gender, WC, TG ) #
2023 Dec 29
1
Help request: Parsing docx files for key words and appending to a spreadsheet
I would also look at https://pandoc.org perhaps which can export a number of formats... And for spreadsheets https://github.com/jqnatividad/qsv is my goto weapon. Can also read and write XLSX and others. A sample document or two would always be helpful... el On 29/12/2023 21:01, CALUM POLWART wrote: > It sounded like he looked at officeR but I would agree > > content <-