search for: polwart

Displaying 20 results from an estimated 30 matches for "polwart".

Did you mean: polar
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
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 Feb 21
1
odfWeave - merged table cells, and adding information like totals and p-values
...#39;m thinking that we often put crude numbers in and (%) in brackets, or CIs etc - so my exported table would not ideally be pure numbers. - As a p value usually links two columns I might have expected to use a merged cell which again brings me back to my original question ;-) Thanks Calum Polwart BSc(Hons) MSc MRPharmS SP IP Network Pharmacist - North of England Cancer Network and Pharmacy Clinical Team Manager (Cancer & Aseptic Services) - County Durham & Darlington NHS Foundation Trust ***********************************************************************************************...
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
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
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 (
2024 Feb 12
1
Avoiding Delete key function as 'Quit R' in Rterm when there are no characters in cursor line
...on with DEL was probably an implementation compromise and I've changed that in R-devel. Thanks for the report. More implementation details in the bugzilla report: https://bugs.r-project.org/show_bug.cgi?id=18666 Best Tomas > Iago > > ________________________________ > De: CALUM POLWART <polc1410 at gmail.com> > Enviat el: divendres, 9 de febrer de 2024 18:28 > Per a: Duncan Murdoch <murdoch.duncan at gmail.com> > A/c: Iago Gin? V?zquez <iago.gine at sjd.es>; r-help at r-project.org <r-help at r-project.org> > Tema: Re: [R] Avoiding Delete key f...
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 <- officer::docx_summary("filename.docx") > > Would get the text content into an object called content. > > That object is a data.frame so you can then manipulate it. > To be more spe...
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
2023 Dec 30
1
Help request: Parsing docx files for key words and appending to a spreadsheet
...her do the trick. Is this a result of me using the tkinter folder selection that you remarked on? I wanted to keep that so that the selection is interactive, but if there are better ways of doing this I am open to suggestions. Thanks again, both. Best wishes Andrew On 29/12/2023 22:25, CALUM POLWART wrote: > > > 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...
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 ) #
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
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...
2023 Nov 05
1
I need to create new variables based on two numeric variables and one dichotomize conditional category variables.
...overs, some programs implicitly do such a factor conversion if needed. An example might be aspects of the ggplot program where you may get a mysterious order of presentation in the graph unless you create a factor with the order you wish to have used and avoid it making one invisibly. From: CALUM POLWART <polc1410 at gmail.com> Sent: Saturday, November 4, 2023 7:14 PM To: avi.e.gross at gmail.com Cc: Jorgen Harmse <JHarmse at roku.com>; r-help at r-project.org; mkzaman.m at gmail.com Subject: Re: [R] I need to create new variables based on two numeric variables and one dichotomize cond...
2024 Feb 09
1
Avoiding Delete key function as 'Quit R' in Rterm when there are no characters in cursor line
Duncan, do you think it's worth to comment this in R-devel list? Iago ________________________________ De: CALUM POLWART <polc1410 at gmail.com> Enviat el: divendres, 9 de febrer de 2024 18:28 Per a: Duncan Murdoch <murdoch.duncan at gmail.com> A/c: Iago Gin? V?zquez <iago.gine at sjd.es>; r-help at r-project.org <r-help at r-project.org> Tema: Re: [R] Avoiding Delete key function as 'Quit...
2009 Sep 14
2
Is there an equivalent of "echo"
Sorry I'm having one of those moments where I can't find the answer but I bet its obvious... I'm outputting my results to a file using sink() Is there a command simillar to php's echo command that would allow me to add some text to that file ie: dataFr$a = 1:10 dataFr$b = 2*1:10 sink ("filepath/filename.txt", split=T) #Show number of entries in vector a table
2023 Dec 29
1
Help request: Parsing docx files for key words and appending to a spreadsheet
...rg 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 <- officer::docx_summary("filename.docx") >> >> Would get the text content into an object called content. >> >> That object is a data.frame so you can then manipulat...
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
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
2023 Dec 30
1
Help request: Parsing docx files for key words and appending to a spreadsheet
...ing the tkinter folder selection that you > remarked on? I wanted to keep that so that the selection is interactive, > but if there are better ways of doing this I am open to suggestions. > > Thanks again, both. > > Best wishes > Andrew > > > On 29/12/2023 22:25, CALUM POLWART wrote: > > > > > > 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!! > > > > &g...