search for: tbl_df

Displaying 20 results from an estimated 32 matches for "tbl_df".

2018 Aug 14
1
R CMD check warnings on Windows
..._64/bujar-00check.html * installing *source* package 'bujar' ... ** package 'bujar' successfully unpacked and MD5 sums checked ** R ** data ** inst ** byte-compile and prepare package for lazy loading Warning: S3 methods '[.fun_list', '[.grouped_df', 'all.equal.tbl_df', 'anti_join.data.frame', 'anti_join.tbl_df', 'arrange.data.frame', 'arrange.default', 'arrange.grouped_df', 'arrange.tbl_df', 'arrange_.data.frame', 'arrange_.tbl_df', 'as.data.frame.grouped_df', 'as.data.frame.rowwise...
2017 Jun 07
1
Errors running spdplyr example
...;- wrld_simpl %>% mutate(lon = coordinates(wrld_simpl)[,1], lat = coordinates(wrld_simpl)[,2]) %>% filter(lat < -20, lon > 60) %>% dplyr::select(NAME) I got the following error messages: Error in (function (cl, name, valueClass) : c("assignment of an object of class ?tbl_df? is not valid for @?data? in an object of class ?SpatialPolygonsDataFrame?; is(value, \"data.frame\") is not TRUE", "assignment of an object of class ?tbl? is not valid for @?data? in an object of class ?SpatialPolygonsDataFrame?; is(value, \"data.frame\") is not TRUE&...
2017 Jul 06
0
Bayes Factor
...of the form: competitionBayesOut <- anovaBF(biomass ~ clipping, data = competition) Returns the following Error message: Error in (function (classes, fdef, mtable) : unable to find an inherited method for function ?compare? for signature ?"BFlinearModel", "missing", "tbl_df"? My guess the problem is in the ?class?, which is: [1] ?tbl_df? ?tbl? ?data.frame? The data was imported via the ?readr? package through R Studio, and then saved as a RData file. My code is below, and the data is attached as a text file. Thanks for your assistance. Best regards, James #...
2018 Mar 22
1
Calculate weighted proportions for several factors at once
...######################## # reproducible example df1 <- data.frame(wt=rnorm(90), group=paste0('reg', 1:5), var1=rep(c('male','female'), times=45), var2=rep(c('low','med','high'), each=30)) %>% tbl_df() # instead of doing this separately for each factor ... df2 <- df1 %>% group_by(group) %>% dplyr::count(var1, wt=wt) %>% mutate(prop1=n/sum(n)) df3 <- df1 %>% group_by(group) %>% dplyr::count(var2, wt=wt) %>% mutate(prop2=n/sum(n)) %>% left_join(df2, by=&...
2017 Jul 11
2
Extracting sentences with combinations of target words/terms from cancer patient text medical records
...ains no target words.", "This sentence contains the words breast and the term metastatic. This sentence contains the word breast and the term stage IV." ) ), .Names = c("PTNO", "DATE", "TYPE", "TVAR"), class = c("tbl_df", "tbl", "data.frame"), row.names = c(NA,-4L) ) sampletxt2 <- group_by_at(sampletxt, vars(PTNO, DATE, TYPE)) sampletxt2 <- sampletxt2 %>% mutate( EXTRACTED = sentence_match(TVAR) )
2023 Nov 30
1
back tick names with predict function
...wt` = c(212, 241, 215, 225, 250, 241, 237, ??????????????????????????? 282, 206, 246, 194, 241, 196, 193, 224, 257, 200, 190, 208, 224 ), `plant-density` = c(137, 107, 132, 135, 115, 103, 102, 65, ?????????????????????? 149, 85, 173, 124, 157, 184, 112, 80, 165, 160, 157, 119)), class = c("tbl_df", "tbl", "data.frame"), row.names = c(NA, -20L)) # regression model works mod2 = lm(`cob-wt` ~ `plant-density`, data = cob) # x sequence for plotting CI's # Set up x points x = seq(min(cob$`plant-density`), max(cob$`plant-density`), length = 1000) # Use predict to ge...
2017 Jul 12
0
Extracting sentences with combinations of target words/terms from cancer patient text medical records
...uot;, > "This sentence contains the words breast and the term metastatic. This >sentence contains the word breast and the term stage IV." > ) > ), > .Names = c("PTNO", "DATE", "TYPE", "TVAR"), > class = c("tbl_df", > "tbl", "data.frame"), > row.names = c(NA,-4L) > ) > >sampletxt2 <- group_by_at(sampletxt, vars(PTNO, DATE, TYPE)) >sampletxt2 <- > sampletxt2 %>% > mutate( > EXTRACTED = sentence_match(TVAR) > ) > >____...
2017 Jul 12
2
Extracting sentences with combinations of target words/terms from cancer patient text medical records
...uot;, > "This sentence contains the words breast and the term metastatic. This >sentence contains the word breast and the term stage IV." > ) > ), > .Names = c("PTNO", "DATE", "TYPE", "TVAR"), > class = c("tbl_df", > "tbl", "data.frame"), > row.names = c(NA,-4L) > ) > >sampletxt2 <- group_by_at(sampletxt, vars(PTNO, DATE, TYPE)) >sampletxt2 <- > sampletxt2 %>% > mutate( > EXTRACTED = sentence_match(TVAR) > ) > >____...
2017 Jul 13
1
Extracting sentences with combinations of target words/terms from cancer patient text medical records
...ains no target words.", "This sentence contains the words breast and the term metastatic. This sentence contains the word breast and the term stage IV." ) ), .Names = c("PTNO", "DATE", "TYPE", "TVAR"), class = c("tbl_df", "tbl", "data.frame"), row.names = c(NA,-4L) ) sampletxt$EXTRACTED <- sapply(sampletxt$TVAR, sentence_match) sampletxt$EXTRACTED > sampletxt$EXTRACTED [1] ": "...
2023 Nov 30
1
back tick names with predict function
...0, 241, 237, > ??????????????????????????? 282, 206, 246, 194, 241, 196, 193, 224, > 257, 200, 190, 208, 224 > ), `plant-density` = c(137, 107, 132, 135, 115, 103, 102, 65, > ?????????????????????? 149, 85, 173, 124, 157, 184, 112, 80, 165, 160, > 157, 119)), > class = c("tbl_df", "tbl", "data.frame"), row.names = c(NA, -20L)) > > # regression model works > mod2 = lm(`cob-wt` ~ `plant-density`, data = cob) > > # x sequence for plotting CI's > # Set up x points > x = seq(min(cob$`plant-density`), max(cob$`plant-density`),...
2017 Jul 11
0
Extracting sentences with combinations of target words/terms from cancer patient text medical records
..."This sentence contains the words breast and the term metastatic. > This > sentence contains the word breast and the term stage IV." > ) > ), > .Names = c("PTNO", "DATE", "TYPE", "TVAR"), > class = c("tbl_df", > "tbl", "data.frame"), > row.names = c(NA,-4L) > ) > > sampletxt2 <- group_by_at(sampletxt, vars(PTNO, DATE, TYPE)) > sampletxt2 <- > sampletxt2 %>% > mutate( > EXTRACTED = sentence_match(TVAR) > ) >...
2024 Jan 30
1
R interpreting numeric field as a boolean field
..., NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, > NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, ... > FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, NA, NA, > FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, > FALSE, FALSE, FALSE)), class = c("tbl_df", "tbl", "data.frame" > ), row.names = c(NA, -7033L)) > > As you can see, when I do the dput, it gives me a bunch of TRUE and FALSE > values, when in reality I have records with value $0, records with amounts >> $0 and also a bunch of blank records. >...
2017 Jul 13
0
Extracting sentences with combinations of target words/terms from cancer patient text medical records
...ains no target words.", "This sentence contains the words breast and the term metastatic. This sentence contains the word breast and the term stage IV." ) ), .Names = c("PTNO", "DATE", "TYPE", "TVAR"), class = c("tbl_df", "tbl", "data.frame"), row.names = c(NA,-4L) ) sampletxt$EXTRACTED <- sapply(sampletxt$TVAR, sentence_match) sampletxt$EXTRACTED > sampletxt$EXTRACTED [1] ": "...
2024 Jan 30
1
R interpreting numeric field as a boolean field
...NA, NA, NA, NA, NA, > > NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, > ... > > FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, NA, NA, > > FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, > > FALSE, FALSE, FALSE)), class = c("tbl_df", "tbl", "data.frame" > > ), row.names = c(NA, -7033L)) > > > > As you can see, when I do the dput, it gives me a bunch of TRUE and FALSE > > values, when in reality I have records with value $0, records with > amounts > >> $0 and also a...
2017 Jul 06
0
Bayes Factor
...estion about Bayes Factor. But, just answered my own question. What is needed is to convert a 'dplyr' data frame into a standard data frame. competition2 <- data.frame(competition), where 'competition' is a 'dplyr' data frame with the following class structure. [1] "tbl_df" "tbl" "data.frame". Best regards, James
2024 Jan 30
1
R interpreting numeric field as a boolean field
...; > NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, > ... > > FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, NA, NA, > > FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, > > FALSE, FALSE, FALSE)), class = c("tbl_df", "tbl", "data.frame" > > ), row.names = c(NA, -7033L)) > > > > As you can see, when I do the dput, it gives me a bunch of TRUE > and FALSE > > values, when in reality I have records with value $0, records > with amo...
2017 Oct 09
0
example of geom_contour() with function argument
...the same as the data (5625): > x, y, z, df > That's not what I get: > v <- ggplot(faithfuld, aes(waiting, eruptions, z = drmvt, df = c(13,13))) > v + geom_contour() Error in FUN(X[[i]], ...) : object 'drmvt' not found > > ? faithfuld > str(faithfuld) Classes ?tbl_df?, ?tbl? and 'data.frame': 5625 obs. of 3 variables: $ eruptions: num 1.6 1.65 1.69 1.74 1.79 ... $ waiting : num 43 43 43 43 43 43 43 43 43 43 ... $ density : num 0.00322 0.00384 0.00444 0.00498 0.00542 ... So you are apparently trying to throw together code and data that you don&...
2024 Jan 30
1
R interpreting numeric field as a boolean field
...A, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, >> > ... >> > > FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, NA, NA, >> > > FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, >> > > FALSE, FALSE, FALSE)), class = c("tbl_df", "tbl", "data.frame" >> > > ), row.names = c(NA, -7033L)) >> > > >> > > As you can see, when I do the dput, it gives me a bunch of TRUE and >> FALSE >> > > values, when in reality I have records with value $0, records w...
2024 Jan 30
1
R interpreting numeric field as a boolean field
...A, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, >>> > ... >>> > > FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, NA, NA, >>> > > FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, >>> > > FALSE, FALSE, FALSE)), class = c("tbl_df", "tbl", "data.frame" >>> > > ), row.names = c(NA, -7033L)) >>> > > >>> > > As you can see, when I do the dput, it gives me a bunch of TRUE and >>> FALSE >>> > > values, when in reality I have records with...
2017 Oct 09
3
example of geom_contour() with function argument
...> > > That's not what I get: > > > v <- ggplot(faithfuld, aes(waiting, eruptions, z = drmvt, df = c(13,13))) > > v + geom_contour() > Error in FUN(X[[i]], ...) : object 'drmvt' not found > > > > ? faithfuld > > str(faithfuld) > Classes ?tbl_df?, ?tbl? and 'data.frame': 5625 obs. of 3 variables: > $ eruptions: num 1.6 1.65 1.69 1.74 1.79 ... > $ waiting : num 43 43 43 43 43 43 43 43 43 43 ... > $ density : num 0.00322 0.00384 0.00444 0.00498 0.00542 ... > > So you are apparently trying to throw togeth...