search for: row_numb

Displaying 9 results from an estimated 9 matches for "row_numb".

Did you mean: row_num
2017 Jul 13
0
Help with R script
...ame1", "Fval: ", "FName: fname2", "Fval: Fval2.name2", "FName: fname3") data.frame(x = ex_dat) %>% separate(x, c("F1", "F2"), sep = ": ") %>% filter(F2 != "") %>% group_by(F1) %>% mutate(indx = row_number()) %>% spread(F1, F2, fill = "") %>% gather(F1, F2, FName, Fval) %>% arrange(indx) %>% mutate(x = paste(F1, F2, sep = ": ")) %>% select(x) %>% flatten_chr() It is not particularly nice or clever, but it gets the job done using R. HTH Ulrik On T...
2017 Jul 13
2
Help with R script
Dear R-help Group Scenario 1: I have a text file running to 1000 of lines...that is like as follows: [922] "FieldName: Wk3PackSubMonth" [923] "FieldValue: Apr" [924] "FieldName: Wk3PackSubYear" [925] "FieldValue: 2017" [926] "FieldName: Wk3Code1" [927] "FieldValue: " [928] "FieldValue: K4" [929] "FieldName:
2017 Jul 13
2
Help with R script
...t;, "FName: fname2", "Fval: Fval2.name2", "FName: fname3") data.frame(x = ex_dat) %>% separate(x, c("F1", "F2"), sep = ": ") %>% filter(F2 != "") %>% group_by(F1) %>% mutate(indx = row_number()) %>% spread(F1, F2, fill = "") %>% gather(F1, F2, FName, Fval) %>% arrange(indx) %>% mutate(x = paste(F1, F2, sep = ": ")) %>% select(x) %>% flatten_chr() It is not particularly nice or clever, but it gets the jo...
2012 Jan 27
3
Subsetting for the ten highest values by group in a dataframe
Hello, I am looking for a way to subset a data frame by choosing the top ten maximum values from that dataframe. As well this occurs within some factor levels. ## I've used plyr here but I'm not married to this approach require(plyr) ## I've created a data.frame with two groups and then a id variable (y) df <- data.frame(x=rnorm(400, mean=20), y=1:400,
2017 Jul 14
0
Help with R script
...e2", "Fval: Fval2.name2", "FName: fname3") > > data.frame(x = ex_dat) %>% > separate(x, c("F1", "F2"), sep = ": ") %>% > filter(F2 != "") %>% > group_by(F1) %>% > mutate(indx = row_number()) %>% > spread(F1, F2, fill = "") %>% > gather(F1, F2, FName, Fval) %>% > arrange(indx) %>% > mutate(x = paste(F1, F2, sep = ": ")) %>% > select(x) %>% > flatten_chr() > > It is not particularly...
2024 May 25
1
dplyr, group_by and selective action according to each group
.... But if you want to get working code sooner, consider using methods you understand rather than seeing if someone in the tidyverse universe has already created exactly what you want. There are things you can access such as if you want to keep only the first record in each group, you can filter by row_number==1, or use the do() function. The dplyr (and related packages) keep evolving and functionality may be deprecated, but check this page for ideas: https://dplyr.tidyverse.org/reference/group_data.html Some of those may give you access to which rows are in each group and to other ways to approach...
2024 May 24
1
dplyr, group_by and selective action according to each group
Laurent: As I don't use dplyr, this won't help you, but I hope you and others may find it entertaining anyway. If I understand you correctly (and ignore this if I have not), there are a ton of ways to do this in base R, including using switch() along the lines you noted in your post. However, when the functions get sufficiently complicated or numerous, it may be useful to store them in a
2006 Mar 28
74
Is this an elaborate hoax/troll?
I sure hope so: http://duckdown.blogspot.com/2006/03/additional-thoughts-on-why-ruby-isnt.html Seems like it''s getting genuine rebuttals, though. It''s actually kind of amusing.
2009 Feb 16
24
como consultar en oracle
holaa todos ante todo un cordial saludo alguien que me pueda ayudar. se plantea lo siguiente necesito mostrar 2 campos de una tabla los cuales son mtin_mtin,mtin_descri de una tabla llamada re_tmtinv de esos dos campos se necesita obtener el codigo y la descripcion,y luego ser mostrado para despues ser agregados a un formulario. el problema que tengo es que ya tengo la vista pero esta en blanco