Thanks Dr. Michaels.
‐‐‐ Original Message ‐‐‐
On Sunday, June 13th, 2021 at 4:17 PM, William Michels
wrote:
> Maybe something like this?
>
> > df_A <- data.frame(names=LETTERS[1:10], values_A=1:10)
> >
> > df_B <- data.frame(names=LETTERS[6:15], values_B=11:20)
> >
> > df_AB <-
Maybe something like this?
> df_A <- data.frame(names=LETTERS[1:10], values_A=1:10)
> df_B <- data.frame(names=LETTERS[6:15], values_B=11:20)
> df_AB <- merge(df_A, df_B, by="names")
> df_AAB <- merge(df_A, df_AB, all.x=TRUE)
> df_BAB <- merge(df_B, df_AB, all.x=TRUE)
> df_C <- df_AAB[is.na(df_AAB
... but I *think*
merge(A, B, by = "name", all = TRUE)
is what you want. Rows of NA's correspond to rows that were in one but not
the other.
Bert Gunter
"The trouble with having an open mind is that people keep coming along and
sticking things into it."
-- Opus (aka Berkeley Breathed in his "Bl
As always, a reprex would considerably improve the chances of a useful
reply... See the posting guide linked below.
Bert Gunter
"The trouble with having an open mind is that people keep coming along and
sticking things into it."
-- Opus (aka Berkeley Breathed in his "Bloom County" comic strip )
This is even complicated to write into a question
Have two data.frames (A and B)
data.frame A and B each have a name column. Want to compare A and B data.frame
to each other based on the values in the 'names' columns - for every name that
appears in dataframe A but not B, I want to copy th
This is even complicated to write into a question
Have two data.frames (A and B)
data.frame A and B each have a name column. Want to compare A and B data.frame
to each other based on the values in the 'names' columns - for every name that
appears in dataframe A but not B, I want to copy th
Hello
thanks to my friend Diego, a computer agronomist,
I was able to figure out how to do it.
I still have only one problem: how do I calculate the data for the
first week? The traps were set up on the fields on May 5th. On that
date, a 0 could be entered for all time-series. But how to do it with
JL,
There are many ways to do what you want. If you need to do it by yourself
using standard R, there are ways but if you are allowed to use packages,
like the forcats package in the tidyverse, it can be fairly simple. Here for
example is a way to convert a factor with the four levels you mention
I believe I have found and fixed a bug in webshot2 that was causing
these problems. My current recommendation for installing it is to use
remotes::install_github("dmurdoch/webshot2@fixlockup")
For more details (and a bug fix for pkgdown, if you're trying to put
dynamic graphics on a pkgdown
Hello Jim,
On Sunday, 13 Jun 2021 at 08:40, Jim Lemon wrote:
> Hi Jeremie,
> Or assuming that the matrix will always contain strings:
>
> tabify<-function(x,col_names=NULL) {
> # convert NAs to "NA"
> x[is.na(x)]<-"NA"
> # if this matrix doesn't have any column names
> if(is.null(col_names))
factor( DF$numbers
, levels=1:4
, labels=c( "bottom", "middle", "high" , "top" )
)
On June 12, 2021 8:24:31 AM PDT, Jxay Ljj wrote:
>Hi
>
>I would like to convert numbers into different categorical levels . For
>example,
>
>In one of column of a dataframe, there are numbers: 1,2
11 matches
Mail list logo