Re: [R] Help with r script

2018-09-05 Thread ruipbarradas
Hello, 25*30 This is the most basic possible, please google an intro text and run its examples. Hope this helps, Rui Barradas  Enviado a partir do meu smartphone Samsung Galaxy. Mensagem original De: Nathan D Jennings Data: 05/09/2018 00:30 (GMT+00:00) Para: r-help@r-projec

Re: [R] Help with r script

2018-09-04 Thread Jeff Newmiller
On Tue, 4 Sep 2018, Nathan D Jennings wrote: ?To the R Project: This is the R-help mailing list, populated by various people who use R including the occasional R-core developer. I am using R Studio and I need help sum product exponents with R Script. a) This is the R-help mailing list, n

Re: [R] Help with R script

2017-07-14 Thread Vijayan Padmanabhan
these solutions.. Thanks & Regards VP From: Ulrik Stervbo To: "MacQueen, Don" , Vijayan Padmanabhan , "r-help@r-project.org" Date: 14-07-2017 10:39 Subject: Re: [R] Help with R script @Don your

Re: [R] Help with R script

2017-07-13 Thread Ulrik Stervbo
@Don your solution does not solve Vijayan's scenario 2. I used spread and gather for that. An alternative solution to insert mising Fval - picking up with Don's newtst - is newtst <- c("FName: fname1", "Fval: Fval1.name1", "FName: fname2", "Fval: Fval2.name2", "FName: fname3", "FName: fname4", "F

Re: [R] Help with R script

2017-07-13 Thread MacQueen, Don
Using Ulrik’s example data (and assuming I understand what is wanted), here is what I would do: ex.dat <- c("FName: fname1", "Fval: Fval1.name1", "Fval: ", "FName: fname2", "Fval: Fval2.name2", "FName: fname3") tst <- data.frame(x = ex.dat, stringsAsFactors=FALSE) sp <- strsplit(tst$x, ':', fix

Re: [R] Help with R script

2017-07-13 Thread Ulrik Stervbo
Hi Vijayan, one way going about it *could* be this: library(dplyr) library(tidyr) library(purrr) ex_dat <- c("FName: fname1", "Fval: Fval1.name1", "Fval: ", "FName: fname2", "Fval: Fval2.name2", "FName: fname3") data.frame(x = ex_dat) %>% separate(x, c("F1", "F2"), sep = ": ") %>% filter(F2