Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

Recent questions tagged R

0 votes
451 views
1 answer
    When calculating the sum of two data tables, NA+n=NA. > dt1 <- data.table(Name=c("Joe","Ann"), "1"=c( ... done in R? UPDATE: removed typo in dt1 See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
415 views
1 answer
    I am new to shiny but was wondering if there is any way to store a filtered datatable (using the column filters ... of the columns in the table See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
411 views
1 answer
    I have the plot 1 curve(exp(x), from=1, to=5, lwd=5) curve(150-exp(x), from=1, to=5, lwd=5, ... only base R solutions (no ggplot2 / no lattice) See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
762 views
1 answer
    I have a quick question about facet_wrap labels in ggplot2. Below is a simple data frame. One of the variables ( ... "dodge")+ facet_grid(~Year) See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
337 views
1 answer
    I'm using package tm. Say I have a data frame of 2 columns, 500 rows. The first column is ID which is ... it with another data set by ID? See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
472 views
1 answer
    Is there a way to pass a data.table objects to c++ functions using Rcpp and/or RcppArmadillo without manually transforming ... X) { return(X); } See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
488 views
1 answer
    I want to create lagged variable for a variable pm10 and used the following code. However, I could not get what I ... ), class = "data.frame") See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
410 views
1 answer
    I am new to caret, and I just want to ensure that I fully understand what it's doing. Towards ... ) importance(caret.boot.model$finalModel) See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
410 views
1 answer
    > library(data.table) > A <- data.table(x = c(1,1,2,2), y = c(1,2,1,2), v = c(0.1,0.2,0 ... because ..." is then of course also a valid answer. See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
445 views
1 answer
    I have a ggplot map, for example: library(ggmap) ggmap(get_map()) I'd like the axis labels to be automatically ... . longitude -24 becomes 24..W See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
562 views
1 answer
    With data structured as follows... df <- data.frame(Category=c(rep("A",6),rep("B",6)), Year=rep(2010:2015,2), ... 2014 11 0.100 B 2015 12 0.091 See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
380 views
1 answer
    The data.table package is very helpful in terms of speed. But I am having trouble actually using the output from a linear ... z))[3], by=ID]; See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
569 views
1 answer
    When I am using mclapply, from time to time (really randomly) it gives incorrect results. The problem is quite ... fix this problem? Thank you! See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
421 views
1 answer
    I have a dataset whose headers look like so: PID Time Site Rep Count I want sum the Count by Rep for each ... way to speed this up with plyr? See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
465 views
1 answer
    I have two matrices that I want to apply a function to, by rows: matrixA GSM83009 GSM83037 GSM83002 GSM83029 GSM83041 ... )/length(y)) ) } See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
463 views
1 answer
    Hoping there's a simple answer here but I can't find it anywhere. I have a numeric matrix with row names and ... d 6 ... Any tips appreciated. See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
488 views
1 answer
    I have manually created a data set of life expectancies with accompanying 95% confidence bands. I plot these over ... simple way of doing this. See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
369 views
1 answer
    I want to remove duplicate values based upon matches in 2 columns in a dataframe, v2 & v4 must match between ... non-unique rows in data.table. See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
391 views
1 answer
    I have searched exhaustively for a direct R translation for the FIRST. and LAST. pointers in SAS DATA steps but ... in R that emulates this? See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
355 views
1 answer
    I have an RMarkdown document outputting to HTML of the same form as the below example. What do I add where to ... an answer on either. Thanks! See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
487 views
1 answer
    I'm guessing this is an easy question, but I'm new to Cpp, and am stuck. I've created a function in R, ... result = F1(a); return result; } See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
393 views
1 answer
    Suppose I have this plot: ggplot(iris) + geom_point(aes(x=Sepal.Width, y=Sepal.Length, colour=Sepal.Length ... like geom_tile/heatmap. thanks. See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
379 views
1 answer
    Every week I a incomplete dataset for a analysis. That looks like: df1 <- data.frame(var1 = c("a","","","b",""), var2 ... "a","a","a","b","b")) See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
589 views
1 answer
    I'm trying to create separate .csv files for each group in a data frame grouped with dplyr's group_by ... with filenames that include cyl? See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
387 views
1 answer
    As part of a function, I want to output a list of all the arguments and their values, including the default ... provide the output as I want? See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
878 views
1 answer
    I've produced this map in ggplot2: library(maptools); library(ggplot2) data(wrld_simpl) world <- fortify( ... north arrow on map-ggplot2 See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
335 views
1 answer
    I'm using a data frame similar to this one: df<-data.frame(student=c(rep(1,5),rep(2,5)), month=c(1:5 ... ), measure.var2=c("quiz1p2","quiz2p2")) See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
524 views
1 answer
    I have two data frames that have some columns with the same names and others with different names. The data frames look ... names = c(NA, -5L)) See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
Ask a question:
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...