Re: [R] Create a function problem

2021-05-16 Thread PIKAL Petr
rner > Subject: Re: [R] Create a function problem > > Hi Rolf, > I am a beginner for R. > I have a date frame raw. it contents the fields of pedigree.name, UPN, > Test.Result.tr_Test.Result1, Result.tr_gene1, > Test.Result.tr_Variant..nucleotide.1 .. Test.Result.

Re: [R] Create a function problem

2021-05-14 Thread Mathew Guilfoyle
Have you tried putting the a,b, and c column names you are passing in quotes i.e. as strings? Currently your function is expecting separate objects with those names. The select function itself can accept unquoted column names, as can others in R, because specific processing they do in the backg

Re: [R] Create a function problem

2021-05-14 Thread Rolf Turner
On Sat, 15 May 2021 00:55:08 + (UTC) Kai Yang wrote: > Hi Rolf, > I am a beginner for R. Then I suggest that you spend some time learning basic R syntax, with the help of some of the excellent online tutorials. "An Introduction to R" from https://cran.r-project.org/manuals.html would be a g

Re: [R] Create a function problem

2021-05-14 Thread Kai Yang via R-help
Hi Rolf, I am a beginner for R.  I have a date frame raw. it contents the fields of pedigree.name, UPN, Test.Result.tr_Test.Result1, Result.tr_gene1, Test.Result.tr_Variant..nucleotide.1 .. Test.Result.tr_Test.Result20, Result.tr_gene20, Test.Result.tr_Variant..nucleotide.20 Basically, I wa

Re: [R] Create a function problem

2021-05-14 Thread Rolf Turner
On Fri, 14 May 2021 17:42:12 + (UTC) Kai Yang via R-help wrote: > Hello List, I was trying to write a function. But I got a error > message. Can someone help me how to fix it? Many thanks,Kai > > k_subset <- function(p, a, b, c){ > +   p  <- select(raw > +                ,Pedigree.name > +