search for: unnest

Displaying 19 results from an estimated 19 matches for "unnest".

2018 May 02
3
Converting a list to a data frame
Another approach: ######## library(tidyr) L <- list( A = data.frame( x=1:2, y=3:4 ) , B = data.frame( x=5:6, y=7:8 ) ) D <- data.frame( Type = names( L ) , stringsAsFactors = FALSE ) D$data <- L unnest(D, data) #> Type x y #> 1 A 1 3 #> 2 A 2 4 #> 3 B 5 7 #> 4 B 6 8 ######## On Wed, 2 May 2018, Eivind K. Dovik wrote: > On Wed, 2 May 2018, Kevin E. Thorpe wrote: > >> I suspect this is pretty easy, but I'm having trouble figuring it out. >> Basi...
2018 May 03
0
Converting a list to a data frame
...approach: > > ######## > library(tidyr) > L <- list( A = data.frame( x=1:2, y=3:4 ) > , B = data.frame( x=5:6, y=7:8 ) > ) > D <- data.frame( Type = names( L ) > , stringsAsFactors = FALSE > ) > D$data <- L > unnest(D, data) > #> Type x y > #> 1 A 1 3 > #> 2 A 2 4 > #> 3 B 5 7 > #> 4 B 6 8 > ######## I think a slightly more idiomatic tidyverse solution is dplyr::bind_rows() l <- list( A = data.frame(x = 1:2, y = 3:4), B = data.frame(x = 5:6, y = 7:8) ) d...
2017 Jun 30
2
LoopSimplify pass prevents loop unrolling
Hi All, In the attached test case there, is an unnested loop with 2 iterations. The loop latch block is terminated by an unconditional branch, so simplifycfg folds the almost empty latch block into its predecessor which is the loop header. This results in an additional backedge in the CFG, so when LoopRotate pass is called it canonicalizes the loop in...
2017 Aug 25
1
splitting a dataframe in R based on multiple gene names in a specific column
If row numbers can be dispensed with, then tidyr makes this easy with the unnest function: ##### library(dplyr) #> #> Attaching package: 'dplyr' #> The following objects are masked from 'package:stats': #> #> filter, lag #> The following objects are masked from 'package:base': #> #> intersect, setdiff, setequal, union lib...
2018 May 03
1
Converting a list to a data frame
...a data frame. You can convert it to a data frame easily, but the copy and indexing semantics of data tables are quite different than data tables, which could be a real headache for someone not prepared for those differences. (To learn more, read the data tables vignette.) Tibbles (as produced by unnest in my previous response) are not data tables either, but they behave much more like data frames than data tables do. On May 2, 2018 1:30:37 PM MDT, "T?th D?nes" <toth.denes at kogentum.hu> wrote: > > >On 05/02/2018 07:11 PM, Kevin E. Thorpe wrote: >> I suspect this...
2017 Jun 30
2
LoopSimplify pass prevents loop unrolling
...vm-dev-bounces at lists.llvm.org] *On Behalf > Of *Balaram Makam via llvm-dev > *Sent:* Friday, June 30, 2017 10:47 AM > *To:* llvm-dev at lists.llvm.org > *Subject:* [llvm-dev] LoopSimplify pass prevents loop unrolling > > Hi All, > > In the attached test case there, is an unnested loop with 2 > iterations. The loop latch block is terminated by an unconditional > branch, so simplifycfg folds the almost empty latch block into its > *successor* which is the loop header. This results in an additional > backedge in the CFG, so when LoopRotate pass is called it...
2017 Aug 23
0
splitting a dataframe in R based on multiple gene names in a specific column
Hi Bogdan, Messy, and very specific to your problem: df.sample.gene<-read.table( text="Chr Start End Ref Alt Func.refGene Gene.refGene 284 chr2 16080996 16080996 C T ncRNA_exonic GACAT3 448 chr2 113979920 113979920 C T ncRNA_exonic LINC01191,LOC100499194 465 chr2 131279347 131279347 C G ncRNA_exonic LOC440910 525 chr2 223777758 223777758 T A
2017 Aug 22
2
splitting a dataframe in R based on multiple gene names in a specific column
I would appreciate please a suggestion on how to do the following : i'm working with a dataframe in R that contains in a specific column multiple gene names, eg : > df.sample.gene[15:20,2:8] Chr Start End Ref Alt Func.refGene Gene.refGene284 chr2 16080996 16080996 C T ncRNA_exonic GACAT3448 chr2 113979920 113979920 C T ncRNA_exonic LINC01191,LOC100499194465
2018 May 02
0
Converting a list to a data frame
On 05/02/2018 07:11 PM, Kevin E. Thorpe wrote: > I suspect this is pretty easy, but I'm having trouble figuring it out. > Basically, I have a list of data frames such as the following example: > > list(A=data.frame(x=1:2, y=3:4),B=data.frame(x=5:6,y=7:8)) > > I would like to turn this into data frame where the list elements are > essentially rbind'ed together and
2008 Jan 26
0
RSpec and resource_controller plugin
...at.xml { head :ok } end end end To this: class EasywaysController < ResourceController::Base end And the helpers make it dead easy to use these resource controllers polymorphically (i.e. with multiple parent resources using for example AR polymorphic associations) or in both nested and unnested forms. Anyway, in case you can''t tell, I''m pretty pumped about the possibilities of this plugin. BUT Right now it only generates test/unit testcases. I was wondering if any RSpeccers had already gone down this road and whether or not a new generate rspec_scaffold generator m...
2017 Aug 21
3
Help Required in looping visuals
Hi Team , I have a requirement of building set of panels in which each panel has multiple visuals based on single set of dataset values and this thing is repeated for other set of values as well. For this requirement , I am trying to use a for loop to create visuals and panel for each set of values ( like first panel should be for first set of dataset values and so on) . Do we have any available
2018 May 02
0
Converting a list to a data frame
On Wed, 2 May 2018, Kevin E. Thorpe wrote: > I suspect this is pretty easy, but I'm having trouble figuring it out. > Basically, I have a list of data frames such as the following example: > > list(A=data.frame(x=1:2, y=3:4),B=data.frame(x=5:6,y=7:8)) > > I would like to turn this into data frame where the list elements are > essentially rbind'ed together and the
2023 May 02
4
[libnbd PATCH v2 0/2] continue wrapping generated C code harder
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=2172516 v1: https://listman.redhat.com/archives/libguestfs/2023-April/031375.html In v2, move the declaration of the "p" helper variable next to the top of the function. Thanks! Laszlo Laszlo Ersek (2): generator/C: print_wrapper: use helper variable for permitted state check generator/C: lib/api.c: indent arg list 2
2005 Feb 22
2
ERROR NaNs produced; when comparing two logistic regression models with the ANOVA CHI test
Dear R-list, *When comparing two logistic regression models with the anova CHi test, I obtain the following error: (there are no NA's in the time series). How can this be solved such that I can compare two models on the same dataset were different explanatory variables are used? l.KBDI <- glm(zna.arson2 ~ zna.KBDI,family = binomial) l.NDWI <- glm(zna.arson2 ~ zna.NDWI,family
2018 May 02
8
Converting a list to a data frame
I suspect this is pretty easy, but I'm having trouble figuring it out. Basically, I have a list of data frames such as the following example: list(A=data.frame(x=1:2, y=3:4),B=data.frame(x=5:6,y=7:8)) I would like to turn this into data frame where the list elements are essentially rbind'ed together and the element name becomes a new variable. For example, I would like to turn the
2024 Sep 21
3
store list objects in data.table
I am trying to store regression objects in a data.table df <- data.frame(x = rnorm(20)) df[, "y"] <- with(df, x + 0.1 * x^2 + 0.2 * rnorm(20)) mydt <- data.table(mypower = c(1, 2), myreg = list(lm(y ~ x, data = df), lm(y ~ x + I(x^2), data = df))) mydt #?? mypower??? myreg #???? <num>?? <list> #1:?????? 1 <lm[12]> #2:?????? 2 <lm[12]> But mydt[1, 2]
2024 Jul 19
1
Extract
Thank you and sorry for the confusion. The desired result should have 8 variables as a comma separated in each line. The string variable is considered as one variable. The output of your script is wfine for me. Thank you! On Fri, Jul 19, 2024 at 1:00?PM Ebert,Timothy Aaron <tebert at ufl.edu> wrote: > > The desired result is odd. > 1) It looks like the string is duplicated in
2009 Sep 04
2
Nested Fixed Effects - basic questions
Hi R people, I have a very basic question to ask - I'm sorry if it's been asked before, but I searched the archives and could not find an answer. All the examples I found were much more complicated/nuanced versions of the problem - my question is much more simple. I have data with multiple, nested fixed effects (as I understand it, fixed effects are specified by the experimental design
2020 Mar 20
0
[ANNOUNCE] igt-gpu-tools 1.25
...c lib: Fix gem_measure_ring_inflight i915/gem_ctx_shared: Prebind both context images i915/gem_tiled_swapping: Tweak mlocked size build: Ignore warnings for address of packed members i915/perf_pmu: Check on the health of the spinner while waiting tools/l3_parity: Unnest exit handlers tests/debugfs_test: Use O_NONBLOCK runner: Add a timestamp to each log message igt/gem_blits: Check for blitter support before use i915/gem_exec_balancer: Beware the migratory fence i915: More gem_require_blitter() i915/gem_exec_faulting_reloc: Uses...