a) I recommend _not_ overwriting the input files. Very difficult to
debug/recover if anything goes wrong.
b) I recommend making a function that takes the file name, source directory,
and destination directory, and reads the file, makes the change, and writes it
to the output directory.
c)
Cheers Bert, Will do. Best wishes, Chris
On Wednesday, 20 January 2021, 00:35:26 GMT, Bert Gunter
wrote:
You might do better posting this on r-sig-geo -- I believe you will more
likely find the expertise you seek there. Could be wrong of course.
Bert Gunter
"The trouble with having
You might do better posting this on r-sig-geo -- I believe you will more
likely find the expertise you seek there. Could be wrong of course.
Bert Gunter
"The trouble with having an open mind is that people keep coming along and
sticking things into it."
-- Opus (aka Berkeley Breathed in his
I avoid case_when, so don't complain to me about it. Bert and I both suggested
standard evaluation approaches that are very amenable to using lookup tables.
On January 19, 2021 1:51:17 PM PST, Steven Rigatti wrote:
>I use case_when a lot - but I have a lot of dynamic tables to treat
>this
>way
Dear all,
I have more than 200 text files in a folder without header - example below.
I would like to read, add a common date header to all the files, and write
(replace) the files.
## Read files
filelist = list.files(pattern = ".*.txt")
datalist = lapply(filelist, function(x)read.table(x,
Hi
The switch to XUbunutu 20.04 may mean a switch to Pango > 1.44 (it does
on Ubuntu 20.04), which means loss of support for Type 1 fonts (on
Cairo-based graphics devices).
The Courier fonts (the default for "mono" on Cairo-based devices) that
you found are all Type 1 (.pfb) fonts.
What
Dear Bharat Rawlley,
What you tried to do appears to be nonsense. That is, you're treating
PFD_n and drug_code as if they were scores for two different groups.
I assume that what you really want to do is to treat PFD_n as a vector
of scores and drug_code as defining two groups. If that's
David
library(tidyverse)
char_vec <- sample(c("a", "b", "c"), 10, replace = TRUE)
recode(char_vec, a = "Apple")
works for me.
On Tue, 19 Jan 2021 at 15:13, David Winsemius
wrote:
>
> On 1/19/21 11:17 AM, Bill Dunlap wrote:
> > Your translate... function seems unnecessarily complicated and
Hi all, I think this is only the second time that I have posted so I apologise
if my etiquette isn't quite correct.
I'm loading a large (~30GB) geojson file into R using readOGR on a HPC. I am
also loading a small shapefile, and then trying to undertake some processing on
the large geojson
Sent from my iPhone
> On Jan 19, 2021, at 1:52 PM, Steven Rigatti wrote:
>
> I use case_when a lot - but I have a lot of dynamic tables to treat this
> way and case_when has to be hard-coded.
But, but, but my case_when-based illustration let you pass a parameter
dataframe that
I use case_when a lot - but I have a lot of dynamic tables to treat this
way and case_when has to be hard-coded.
On Tue, Jan 19, 2021 at 3:48 PM Jeff Newmiller
wrote:
> Second this. There is also the findInterval function, which omits the
> factor attributes and just returns integers that can
Second this. There is also the findInterval function, which omits the factor
attributes and just returns integers that can be used in lookup tables.
On January 19, 2021 10:33:59 AM PST, Bert Gunter wrote:
>If you are willing to entertain another approach, have a look at ?cut.
>By
>defining the
On 1/19/21 11:17 AM, Bill Dunlap wrote:
Your translate... function seems unnecessarily complicated and reusing the
name 'var' for both the input and the data.frame containing the input makes
it confusing to me. The following replacement, f, uses your algorithm but
I think gets the answer you
Your translate... function seems unnecessarily complicated and reusing the
name 'var' for both the input and the data.frame containing the input makes
it confusing to me. The following replacement, f, uses your algorithm but
I think gets the answer you want.
f <-
function(var, upper, lookup) {
It's not that I can't get the output I want. I was able to do that.
It is just that I can't make it pipeable - I get that weird error message
that I don't understand.
On Tue, Jan 19, 2021 at 1:34 PM Bert Gunter wrote:
> If you are willing to entertain another approach, have a look at ?cut. By
>
On 1/19/21 7:50 AM, Steven Rigatti wrote:
I am having some problems with what seems like a pretty simple issue. I
have some data where I want to convert numbers. Specifically, this is
cancer data and the size of tumors is encoded using millimeter
measurements. However, if the actual
If you are willing to entertain another approach, have a look at ?cut. By
defining the 'breaks' argument appropriately, you can easily create a
factor that tells you which values should be looked up and which accepted
as is. If I understand correctly, this seems to be what you want. If I have
not,
I am having some problems with what seems like a pretty simple issue. I
have some data where I want to convert numbers. Specifically, this is
cancer data and the size of tumors is encoded using millimeter
measurements. However, if the actual measurement is not available the
coding may imply a less
See comments inline
On 19/01/2021 10:46, bharat rawlley wrote:
Thank you for the reply and suggestion, Michael!
I used dput() and this is the output I can share with you. Simply
explained, I have 3 columns namely, drug_code, freq4w_n and PFD_n. Each
column has 132 values (including NA). The
Hi all,
On my system (Xubuntu 20.04), using par(family="mono") is not rendered
correctly. The same issue was raised here:
https://stackoverflow.com/questions/64207220/rendering-plot-in-r-with-mono-spaced-family-font-does-not-display-characters-any
Using par(family="monospace") does work:
There are many caveats about OS specificity on the strptime help page, but
most of them have to do with formatting and fewer with validation. My
reading of the strptime page indicates that conversion with as.POSIXct()
will validate daylight savings times which the examples I gave indicate it
is
Thanks! This solution also looks promising. It should be more stable than
using ssh tunneling. I will also explore this method.
Best,
Jiefei
On Tue, Jan 19, 2021 at 3:11 PM Martin Morgan
wrote:
> A different approach uses doRedis
> https://CRAN.R-project.org/package=doRedis (currently
Thank you! It works now!!
Your guess is correct, I'm using windows so the default ssh does not work.
Sadly the bug hasn't been fixed yet. The PuTTY solution works like a charm.
Glad to know the ssh tunneling trick. This is much simpler than using port
hole punching. This package is awesome! Many
This is https://github.com/emacs-ess/ESS/issues/1047
Best,
Lionel
On 1/19/21, Jeremie Juste via ESS-help wrote:
> Hello,
>
> I would like to use ess-watch from a remote session but I receive the
> follow error. When I execute M-x ess-watch
>
> Error in as.environment("ESSR") :
> no item called
Thank you for the reply and suggestion, Michael!
I used dput() and this is the output I can share with you. Simply explained, I
have 3 columns namely, drug_code, freq4w_n and PFD_n. Each column has 132
values (including NA). The problem with the Wilcoxon Rank Sum test has been
described in my
Unfortunately your data did not come through. Try using dput() and then
pasting that into the body of your e-mail message.
On 18/01/2021 17:26, bharat rawlley via R-help wrote:
Hello,
On running the Wilcoxon Rank Sum test in R and SPSS, I am getting the following
discrepancies which I am
Hello,
R 4.0.3 on Ubuntu 20.04, sessionInfo() below.
A fix is to use as.POSIXct instead:
rui@rui:~$ Rscript --vanilla -e 'as.POSIXlt("2018-03-11 02:09",
tz="America/New_York")'
#[1] "2018-03-11 02:09:00 EDT"
rui@rui:~$ Rscript --vanilla -e 'as.POSIXct("2018-03-11 02:09",
Hello,
I would like to use ess-watch from a remote session but I receive the
follow error. When I execute M-x ess-watch
Error in as.environment("ESSR") :
no item called "ESSR" on the search list
The problem seems to lie with, as.environment("ESSR") that cannot be
found on the remote
on my
This is as described in the documentation, due to OS differences, e.g
[1].
[1] https://stat.ethz.ch/R-manual/R-devel/library/base/html/strptime.html
On January 18, 2021 5:56:11 PM PST, Bill Denney
wrote:
>Hello,
>
>
>
>Dates created with as.POSIXct differ between Windows/Mac and Linux.
Hello,
Dates created with as.POSIXct differ between Windows/Mac and Linux.
Specifically this time that is during a gap when the hour does not exist
due to daylight savings time:
as.POSIXct("2018-03-11 02:09:36", tz="America/New_York")
Gives on Windows:
[1] "2018-03-11 EST"
Gives on
30 matches
Mail list logo