Displaying 20 results from an estimated 54 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
2024 Sep 29
1
Is there a sexy way ...?
...r some of us and I have continued on my own and located functions I see as useful in the stringi and stringr packages to make my silly version ever less silly! LOL!
-----Original Message-----
From: Rolf Turner <rolfturner at posteo.net>
Sent: Saturday, September 28, 2024 10:11 PM
To: CALUM POLWART <polc1410 at gmail.com>
Cc: avi.e.gross at gmail.com; Lennart Kasserra <lennart.kasserra at gmail.com>; r-help at r-project.org
Subject: Re: [R] Is there a sexy way ...?
On Sat, 28 Sep 2024 10:26:31 +0100
CALUM POLWART <polc1410 at gmail.com> wrote:
> Avi
>
> I fear...
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
2024 Sep 29
1
Is there a sexy way ...?
On Sat, 28 Sep 2024 10:26:31 +0100
CALUM POLWART <polc1410 at gmail.com> wrote:
> Avi
>
> I fear this was all a huge social experiment.
>
> Testing if a post titled "sexy way" would increase engagement...
<SNIP>
I conjecture that this conjecture was tongue-in-cheek. Be that as it
were ??, let me assure e...
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
***********************************************************************************************...
2024 Aug 09
3
If loop
...t I think. (I usually return, but return can only
return one object and I think you want two or more"
You can return any number of objects by putting them in a list and
returning the list.
Use of "<<-" is rarely a good idea in R.
-- Bert
On Fri, Aug 9, 2024 at 1:53?AM CALUM POLWART <polc1410 at gmail.com> wrote:
>
> OK. The fact it's in a function is making things clearer.
>
> Are you trying to update the values of an object from within the function,
> and have them available outside the function. I don't speak functional
> programming articula...
2024 Aug 09
2
If loop
...marg1"
> TRUE
> [1] "joint12"
> FALSE
> > try1(marg2=TRUE)
> [1] "marg2"
> TRUE
> > try1(cond12=TRUE)
> [1] "cond12"
> TRUE
> > try1(cond21=TRUE)
> [1] "cond21"
> TRUE
> >
> On 8/9/2024 2:35 PM, CALUM POLWART wrote:
>
> Is something wrong in the initialisation part that we don't see?
>
> joint12 <- marg1 <-F
>
> marg1 <-T
>
> if (joint12) {
> print ("joint 12")
> cat (joint12)
> }
>
> if (marg1) {
> print("marg 1")
> c...
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...
2024 Aug 09
1
If loop
...RUE
[1] "marg1"
FALSE
> try1(marg1=TRUE)
[1] "marg1"
TRUE
[1] "joint12"
FALSE
> try1(marg2=TRUE)
[1] "marg2"
TRUE
> try1(cond12=TRUE)
[1] "cond12"
TRUE
> try1(cond21=TRUE)
[1] "cond21"
TRUE
>
On 8/9/2024 2:35 PM, CALUM POLWART wrote:
>
> Is something wrong in the initialisation part that we don't see?
>
> joint12 <- marg1 <-F
>
> marg1 <-T
>
> if (joint12) {
> ? print ("joint 12")
> ? cat (joint12)
> }
>
> if (marg1) {
> ? print("marg 1")
> ? c...
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...