Thank you Jeff and all. I wish to go back to my student life.
ID is not necessary in dat2, sorry for that.
On Sat, Sep 7, 2019 at 5:10 PM Jeff Newmiller wrote:
>
> Val has been posting to this list for almost a decade [1] so seems unlikely
> to be a student... but in all this time has yet t
Hi Val, see below:
> dat1 <-read.table(text="ID, x, y, z
+ A, 10, 34, 12
+ B, 25, 42, 18
+ C, 14, 20, 8 ",sep=",",header=TRUE,stringsAsFactors=F)
>
> dat2 <-read.table(text="ID, weight
+ A, 0.25
+ B, 0.42
+ C, 0.65 ",sep=",",header=TRUE,stringsAsFactors=F)
>
> dat3 <- data.frame(ID = dat1[,
Val has been posting to this list for almost a decade [1] so seems unlikely to
be a student... but in all this time has yet to figure out how to post in plain
text to avoid corruption of code on this plain text mailing list. The ability
to generate small examples has improved, though execution s
Hello,
The problem itself is simple:
i <- match(dat1$ID, dat2$ID)
colSums(t(dat1[i, -1])*dat2[i, -1])
#1 2 3
#24.58 35.59 17.10
But both dat1 and dat2 are wrong and can be read with read.csv
dat1 <- read.csv(text = "
ID , x, y, z
A, 10, 34, 12
B, 25, 42, 18
C, 14, 20, 8 ", st
dat1 is wrong also. It should read:
dat1 <-read.table(text="ID, x, y, z
A, 10, 34, 12
B, 25, 42, 18
C, 14, 20, 8 ",sep=",",header=TRUE,stringsAsFactors=F)
Is this a homework problem? This list has a no homework policy.
Cheers,
Bert
Bert
Hi all
Correction for my previous posting.
dat2 should be read as
dat2 <-read.table(text="ID, weight
A, 0.25
B, 0.42
C, 0.65 ",sep=",",header=TRUE,stringsAsFactors=F)
On Sat, Sep 7, 2019 at 1:46 PM Val wrote:
>
> Hi All,
>
> I have two data frames with thousand rows and several columns.
Hi All,
I have two data frames with thousand rows and several columns. My
samples of the data frames are shown below
dat1 <-read.table(text="ID, x, y, z
ID , x, y, z
A, 10, 34, 12
B, 25, 42, 18
C, 14, 20, 8 ",sep=",",header=TRUE,stringsAsFactors=F)
dat2 <-read.table(text="ID, x, y, z
ID,
You may get a response here (including my poorly-informed one) but this is off
topic (_do read the Posting Guide_) so you are basically barking into the
darkness here. You should be asking in the RStudio community forum.
As far as I am aware you have to run your RSS in a single environment, so c
Dear R-help Mailing List:
For reproducibility, I want to use Conda + R (IRkernel), which will allow
me to have within the same machine different "environments", with different
versions of R installed, and specific package versions:
http://know.continuum.io/rs/387-XNW-688/images/conda-cheatsheet.p
Hello,
There is no attached file, R-help is doesn't allow many file types.
Try reposting with the extension .txt or post the output of
dput(head(dataset, 20))
directly in your e-mail.
Hope this helps,
Rui Barradas
Às 10:58 de 07/09/19, farshad goudarzian escreveu:
Hello.
Here I attach a m
Hello.
Here I attach a microsoft excel data base file and plot image to illustrate
my question.
my code:
ggplot(concretedata, aes(Company, Concrete, fill=
Type))+geom_bar(stat="identity")
As per the attachment plot, the bar chart for different parameters
(Concrete, Company and Type) is present
11 matches
Mail list logo