r
Testing symmetry on symmetric matrix fails
I have a symmetric matrix (4x4) in memory.Unfortunately, sum( originalMatrix != t( originalMatrix ) ) = 6.So I dput that matrix and read it back into memory.Now sum( dputMa开发者_如何学Gotrix!= t( dpu[详细]
2023-04-11 12:32 分类:问答Substitute values with their mean in a data frame in R
I need to replace the values of the two replica (A and B) in a data frame, with their mean. This is the data frame:[详细]
2023-04-11 12:28 分类:问答Trophic position/height in food webs (following paths in networks)
As part of developing a demo for a package I\'m working on, I need to quantify a classic ecological food web as described below.I have checked out vegan, bipartite and sna but don\'t see anything that[详细]
2023-04-11 12:19 分类:问答Why does mapply not return date-objects?
I have a function that takes a Date-object and returns one. However, when I applied the function to a data.frame column using the mapply function, I ran into problems: I didn\'t get Date-objects back,[详细]
2023-04-11 11:56 分类:问答Create new column based on 4 values in another column
I want to create a new column based on 4 val开发者_如何学JAVAues in another column. if col1=1 then col2= G;[详细]
2023-04-11 09:09 分类:问答How to create a matrix for this heatmap?
I have Person,Messages Dave,8 James,6 Dave,6 Dave,8 Dave,8 John,5 John,5 John,20 Dave,0 .... I want to create a heatmap where message density of each message is shown for all players.I want to lim[详细]
2023-04-11 07:30 分类:问答convert everything import from sqlQuery to character
I have an xls file to be imported into R using RODBC, one of the column has the following data: 1,1A,2,3,4[详细]
2023-04-11 06:58 分类:问答In R, how to use "aggregate" or "by" when not all combinations of factors are present?
Here is a small example to illustrate my data: > df <- data.frame(subgroup=rep(paste(\"s\",1:3, sep=\"\"), times=3),[详细]
2023-04-11 05:03 分类:问答anova test fails on lme fits created with pasted formula
I often specify the formula argument to model fitting functions like lm or lme by pasting together the parts I need, as in @DWin\'s answer to this question: Understanding lm and environment.[详细]
2023-04-11 04:59 分类:问答Creating new data frames from a larger data frame using a list
I have a data frame that contains multiple data points for a large number of samples. Here is a shortened example with 3 samples each with 3 data points:[详细]
2023-04-11 04:38 分类:问答