[R] Extrapolate x values from a defined y sequence

2019-01-14 Thread lionel sicot via R-help
Hello, I have two sets of measurement :with the same x sequence :x1<-1:10y1<-c(5,4.6,4.4,4.2,4,3.8,3.7,3.6,3,1) x2<-1:10y2<-c(5,4.8,4.6,4.4,4.1,4,3.8,3.6,2.8,1) I would like to sum these two curves in terms of x for a given sequence of y (for example : y<-c(5,4.5,4,3.5,3,2.5,2,1.5,1)), that is to

[R] Regular expressions and 2 dots

2019-06-28 Thread lionel sicot via R-help
Hello, I have files from an equipment with column names including dots.I would like to simplify these names but all my attempts with sub and regular expressions are unsuccessful. I havec( "colone..xx.","coltwo.ft..rr.","colthree.gh..az.","colfour.DG..lm.")and I would like to have c( "colone","c

[R] Use gather with a various number of columns

2019-08-27 Thread lionel sicot via R-help
Hello, I'm using the gather function from the tidyr package to reshape data.frames. For example, for the the following dataframe, I apply the command below.df_initial<-data.frame(col1name=c(1,2,3,4,5,6,7), col2name=c(4,5,6,7,8,9,1), col3name=c(9,8,7,6,5,4,3))df_reshaped<-gather(df_initial, "col1

[R] How to evaluate impact of factors on parameters

2020-03-18 Thread lionel sicot via R-help
Hello, One of my colleagues sent me a csv file with 12 columns and a lot of rows. Column1 to Column10 are factors with 2 to 6 levels. Column11 and Column12 are experimental results.I'm a bit lost with all these data. I would like- to determine which factors have the most impact, and in which way