Displaying 20 results from an estimated 30000 matches similar to: "Extract"
2024 Jul 19
1
Extract
Thank you and sorry for the confusion.
The desired result should have 8 variables as a comma separated in
each line. The string variable is considered as one variable.
The output of your script is wfine for me. Thank you!
On Fri, Jul 19, 2024 at 1:00?PM Ebert,Timothy Aaron <tebert at ufl.edu> wrote:
>
> The desired result is odd.
> 1) It looks like the string is duplicated in
2024 Jul 19
1
Extract
Thank you Jeff and Bert for your help!
The components of the string could be nixed (i.e, numeric, character
or date). Once that is splitted it would be easy for me to format it
accordingly.
On Fri, Jul 19, 2024 at 2:10?PM Bert Gunter <bgunter.4567 at gmail.com> wrote:
>
> I did not look closely at the solutions that you were offered, but
> note that you did not specify in your
2024 Jul 21
1
Extract
Val:
I wanted to add here a base R solution to your problem that I realize
you can happily ignore. However, in the course of puzzling over how to
do it using the R native pipe syntax ("|>") , I learned some new stuff
that I thought others might find useful, and it seemed sensible to
keep the code with this thread for comparison.
I want to acknowledge that in the course of my labor,
2024 Jul 21
1
Extract
Thank you Bert!
However, the last line of the script.
dat |> names() |> _[4:8] <- paste0("s", 1:5)
is giving me an error as shown below
Error: pipe placeholder can only be used as a named argument
Thank you!
On Sat, Jul 20, 2024 at 7:41?PM Bert Gunter <bgunter.4567 at gmail.com> wrote:
>
> Val:
> I wanted to add here a base R solution to your problem that I
2024 Jul 19
1
Extract
I did not look closely at the solutions that you were offered, but
note that you did not specify in your post whether the numbers in your
string were to be character or numeric variables after they are broken
out into their own columns. I believe that they are character in the
solutions, but you should check this. If you want them as numeric,
e.g., for further processing, you will need to convert
2024 Jul 19
1
Extract
The desired result is odd.
1) It looks like the string is duplicated in the desired result. The first line of data has "15, xc, Ab", and the desired result has "15, xc, Ab, 15, xc, Ab"
2) The example has S1 through S5, but the desired result has data for eight variables in the first line (not five).
3) The desired result has a different number of variables for each line.
4)
2024 Jul 21
1
Extract
We can use read.table for a base R solution
string <- read.table(text = dat$string, fill = TRUE, header = FALSE,
na.strings = "")
names(string) <- paste0("S", seq_along(string))
cbind(dat[-3], string)
On Fri, Jul 19, 2024 at 12:52?PM Val <valkremk at gmail.com> wrote:
>
> Hi All,
>
> I want to extract new variables from a string and add it to the
2024 Jul 21
1
Extract
Nice! -- Let read.table do the work of handling the NA's.
However, even simpler is to use the 'colnames' argument of
read.table() for the column names no?
string <- read.table(text = dat$string, fill = TRUE, header =
FALSE, na.strings = "",
col.names = paste0("s", 1:5))
dat <- cbind(dat, string)
-- Bert
On Sun, Jul 21, 2024 at 10:16?AM Gabor
2024 Jul 21
1
Extract
Fixing col.names=paste0("S", 1:5) assumes that there will be 5 columns and
we may not want to do that. If there are only 3 fields in string, at the most,
we may wish to generate only 3 columns.
On Sun, Jul 21, 2024 at 2:20?PM Bert Gunter <bgunter.4567 at gmail.com> wrote:
>
> Nice! -- Let read.table do the work of handling the NA's.
> However, even simpler is to use
2024 Jul 22
3
Extract
Base R. Regarding code improvements:
1. Personally I find (\(...) ...)() notation hard to read (although by
placing (\(x), the body and )() on 3 separate lines it can be improved
somewhat). Instead let us use a named function. The name of the
function can also serve to self document the code.
2. The use of dat both at the start of the pipeline and then again
within a later step of the pipeline
2024 Jul 21
1
Extract
As always, good point.
Here's a piped version of your code for those who are pipe
afficianados. As I'm not very skilled with pipes, it might certainly
be improved.
dat <-
dat$string |>
read.table( text = _, fill = TRUE, header = FALSE, na.strings = "") |>
(\(x)'names<-'(x,paste0("s", seq_along(x))))() |>
2024 Jul 22
1
Extract
Thanks.
I found this to be quite informative and a nice example of how useful
R-Help can be as a resource for R users.
Best,
Bert
On Mon, Jul 22, 2024 at 4:50?AM Gabor Grothendieck
<ggrothendieck at gmail.com> wrote:
>
> Base R. Regarding code improvements:
>
> 1. Personally I find (\(...) ...)() notation hard to read (although by
> placing (\(x), the body and )() on 3
2009 Feb 25
3
survival::survfit,plot.survfit
I am confused when trying the function survfit.
my question is: what does the survival curve given by plot.survfit mean?
is it the survival curve with different covariates at different points?
or just the baseline survival curve?
for example, I run the following code and get the survival curve
####
library(survival)
fit<-coxph(Surv(futime,fustat)~resid.ds+rx+ecog.ps,data=ovarian)
2010 Aug 09
3
Extract values from data frame in R
Using R, I would like to find out which Samples (S1, S2, S3, S4, S5) fulfill
the following criteria:contain minimally one value (x, y or z) bigger than
4. Any ideas? Thanks, Alex.
> data
Sample x y z
1 S1 -0.3 5.3 2.5
2 S2 0.4 0.2 -1.2
3 S3 1.2 -0.6 3.2
4 S4 4.3 0.7 5.7
5 S5 2.4 4.3 2.3
2017 Feb 06
2
[PATCH] Optimize silk_warped_autocorrelation_FIX() for ARM NEON
Hi Jean-Marc,
Thanks a lot for reviewing this huge assembly function!
silk_warped_autocorrelation_FIX_c()'s kernel part is
for( n = 0; n < length; n++ ) {
tmp1_QS = silk_LSHIFT32( (opus_int32)input[ n ], QS );
/* Loop over allpass sections */
for( i = 0; i < order; i++ ) {
/* Output of allpass section */
tmp2_QS = silk_SMLAWB(
2017 Feb 07
2
[PATCH] Optimize silk_warped_autocorrelation_FIX() for ARM NEON
This is a great idea. But the order (psEncC->shapingLPCOrder) can be
configured to 12, 14, 16, 20 and 24 according to complexity parameter.
It's hard to get a universal function to handle all these orders
efficiently. Any suggestions?
Thanks,
Linfeng
On Mon, Feb 6, 2017 at 12:40 PM, Jean-Marc Valin <jmvalin at jmvalin.ca> wrote:
> Hi Linfeng,
>
> On 06/02/17 02:51 PM,
2018 Feb 07
2
add geo-replication "passive" node after node replacement
Hi all,
i had a replica 2 gluster 3.12 between S1 and S2 (1 brick per node)
geo-replicated to S5 where both S1 and S2 were visible in the
geo-replication status and S2 "active" while S1 "passive".
I had to replace S1 with S3, so I did an
"add-brick replica 3 S3"
and then
"remove-brick replica 2 S1".
Now I have again a replica 2 gluster between S3 and S2
2017 Feb 07
3
[PATCH] Optimize silk_warped_autocorrelation_FIX() for ARM NEON
Hi Jean-Marc,
Thanks for your suggestions. Will get back to you once we have some updates.
Linfeng
On Mon, Feb 6, 2017 at 5:47 PM, Jean-Marc Valin <jmvalin at jmvalin.ca> wrote:
> Hi Linfeng,
>
> On 06/02/17 07:18 PM, Linfeng Zhang wrote:
> > This is a great idea. But the order (psEncC->shapingLPCOrder) can be
> > configured to 12, 14, 16, 20 and 24 according to
2004 Dec 09
1
more clustering questions
Sorry to bother you kind folks again with my questions. I am trying to
learn as much as I can about all this, and I will admit that I don't
have the proper background, but I hope that someone can at least point
me in the correct direction.
I have created a test matrix for what I want to do:
s1 s2 s3 s4 s5
s1 10 5 0 8 7
s2 5 10 0 0 5
s3 0 0 10 0 0
s4 8 0 0 10 0
s5 7
2017 Apr 05
2
[PATCH] Optimize silk_warped_autocorrelation_FIX() for ARM NEON
I attached a new patch with small cleanup (disassembly is identical as the
last patch). We have done the same internal testing as usual.
Also, attached 2 failed temporary versions which try to reduce code size
(just for code review reference purpose).
The new patch of silk_warped_autocorrelation_FIX_neon() has a code size of
3,228 bytes (with gcc).
smaller_slower.c has a code size of 2,304