Re: [R] HOW TO FILTER DATA

2018-01-03 Thread Leilei Ruan
Try the code below: df <- read_delim("C:/Users/lruan1/Desktop/1112.csv", "|", escape_double = FALSE, trim_ws = TRUE) df_new <- subset(df,df$IPC == 'H04M001/02'| df$IPC == 'C07K016/26' ) You can add more condition with "|" in the subset function. Good luck! On Wed, Jan 3, 2018 at 2:53 PM,

Re: [R] HOW TO FILTER DATA

2018-01-03 Thread Rui Barradas
Hello, If you want to select rows with just one IPC, use `==`. If you want to select rows with several IPC's, use `%in%`. See the code below for the two ways of doing this. oecd <- read.table(text = " Appln_id|Prio_Year|App_year|IPC 1|1999|2000|H04Q007/32 1|1999|2000|G06K019/077

[R-es] Transformando variables

2018-01-03 Thread Alex
¡Muy buenas! Ahora que estoy más a fondo con R estoy empezando a hacer análisis estadísticos de experimentos reales. Un ejemplo es la ANOVA. Comprobando la normalidad de los datos para una ANOVA de dos vías, vi que algunas de las variables no cumplían la condición, así que hice una transformación

Re: [R] summary.rms help

2018-01-03 Thread David Winsemius
> On Jan 3, 2018, at 11:57 AM, Andras Farkas via R-help > wrote: > > Dear All, > using the example from the help of summary.rms > > library(rms) > n <- 1000# define sample size > set.seed(17) # so can reproduce the results > age<- rnorm(n, 50, 10) >

[R] summary.rms help

2018-01-03 Thread Andras Farkas via R-help
Dear All, using the example from the help of summary.rms library(rms) n <- 1000# define sample size set.seed(17) # so can reproduce the results age<- rnorm(n, 50, 10) blood.pressure <- rnorm(n, 120, 15) cholesterol<- rnorm(n, 200, 25) sex<-

[R] HOW TO FILTER DATA

2018-01-03 Thread Saptorshee Kanto Chakraborty
Hello, I have a data of Patents from OECD in delimited text format with IPC being one column, I want to filter the data by selecting only certain IPC in that column and delete other rows which do not have my required IPCs. Please, can anybody guide me doing it, also the IPC codes are string

Re: [R] Help with Regular expression

2018-01-03 Thread Rui Barradas
Hello, I believe the following regex will do it. x <- "\":\"03-JAN-2018 16:00:00\"" sub('^.*(\\d{2}-\\w{3}-\\d{4} \\d{2}:\\d{2}:\\d{2})[:"]', '\\1', x) Hope this helps, Rui Barradas On 1/3/2018 2:26 PM, Christofer Bogaso wrote: Hi, I was working on following expression :

[R] start values for random effects in nlme

2018-01-03 Thread Jos Lommerse
Hi Lindsey, Yeah, I do realize that this answer gets to you 12 years too late, however, it may be helpful to others in future. I have been struggling with the same issue. When analysing the source code (https://svn.r-project.org/R-packages/trunk/nlme/R/nlme.R) I found out that the E matrix

Re: [R] Help with Regular expression

2018-01-03 Thread David Wolfskill
On Wed, Jan 03, 2018 at 07:56:27PM +0530, Christofer Bogaso wrote: > Hi, > > I was working on following expression : > > "\":\"03-JAN-2018 16:00:00\"" > > > This is basically a combination of Date and Time mixed with some Noise. > > I want to extract only Date and Time part i.e. "03-JAN-2018

[R] Help with Regular expression

2018-01-03 Thread Christofer Bogaso
Hi, I was working on following expression : "\":\"03-JAN-2018 16:00:00\"" This is basically a combination of Date and Time mixed with some Noise. I want to extract only Date and Time part i.e. "03-JAN-2018 16:00:00 I tried following :

Re: [R] Help with first S3-class

2018-01-03 Thread Martin Møller Skarbiniks Pedersen
On 3 January 2018 at 08:36, Jeff Newmiller wrote: > Function arguments are not pass-by-reference... they are pass-by-value. You > need to return the altered object to the caller when you are done messing > with it. Thanks. Of course. Now it is working. > Note that R