search for: marongiu

Displaying 20 results from an estimated 41 matches for "marongiu".

2018 Jan 22
2
substr gives empty output
...n y <- substr(x, i, 1) your third integer needs to be the location not the number of digits, so change it to y <- substr(x, i, i) and you should get what you want. Cheers, Tim > Date: Sun, 21 Jan 2018 10:50:31 -0500 > From: Ek Esawi <esawiek at gmail.com> > To: Luigi Marongiu <marongiu.luigi at gmail.com>, r-help at r-project.org > Subject: Re: [R] substr gives empty output > Message-ID: > <CA+ZkTxubYDSZ3iqsg_=be9HBA2_3-TE95=mXbh4atvG- > ri_ixQ at mail.gmail.com> > Content-Type: text/plain; charset="UTF-8" > > The reas...
2020 Oct 23
2
How to shade area between lines in ggplot2
...rote: > > Hi > > What about something like > > p+geom_ribbon(aes(ymin = slope_1*x + intercept_1 - 1/w[2], > ymax = slope_1*x + intercept_1 + 1/w[2], fill = "grey70", alpha=0.1)) > > Cheers > Petr > > > -----Original Message----- > > From: Luigi Marongiu <marongiu.luigi at gmail.com> > > Sent: Friday, October 23, 2020 11:11 AM > > To: PIKAL Petr <petr.pikal at precheza.cz> > > Cc: r-help <r-help at r-project.org> > > Subject: Re: [R] How to shade area between lines in ggplot2 > > > > also from t...
2020 Oct 26
0
How to shade area between lines in ggplot2
...data in ribbon call. Something like newdat <- trainset newdat$z <- factor(0) p+geom_ribbon(data=newdat, aes(ymin = slope_1*x + intercept_1 - 1/w[2], ymax = slope_1*x + intercept_1 + 1/w[2]), fill = "yellow", alpha=0.1) Cheers Petr > -----Original Message----- > From: Luigi Marongiu <marongiu.luigi at gmail.com> > Sent: Friday, October 23, 2020 3:30 PM > To: PIKAL Petr <petr.pikal at precheza.cz> > Cc: r-help <r-help at r-project.org> > Subject: Re: [R] How to shade area between lines in ggplot2 > > Thank you, but this split the area into tw...
2018 Jan 21
3
substr gives empty output
Dear all, I have a string, let's say "testing", and I would like to extract in sequence each letter (character) from it. But when I use substr() I only properly get the first character, the rest is empty (""). What am I getting wrong? For example, I have this code: >>> x <- "testing" k <- nchar(x) for (i in 1:k) { y <- substr(x, i, 1)
2020 Oct 23
0
How to shade area between lines in ggplot2
Hi What about something like p+geom_ribbon(aes(ymin = slope_1*x + intercept_1 - 1/w[2], ymax = slope_1*x + intercept_1 + 1/w[2], fill = "grey70", alpha=0.1)) Cheers Petr > -----Original Message----- > From: Luigi Marongiu <marongiu.luigi at gmail.com> > Sent: Friday, October 23, 2020 11:11 AM > To: PIKAL Petr <petr.pikal at precheza.cz> > Cc: r-help <r-help at r-project.org> > Subject: Re: [R] How to shade area between lines in ggplot2 > > also from this site: https://plotly.com/g...
2020 Oct 20
0
How to assign the same levels to a dataframe column?
...t and in what order. As for extracting subsets, use split() and do your subsets on each set of rows with the same level. It will be on you to decide what statistical properties (proportions?) you want to maintain between the full data set and your subset. On October 20, 2020 6:42:27 AM PDT, Luigi Marongiu <marongiu.luigi at gmail.com> wrote: >Hello, >I have a dataframe df with a column x that has these unique values: >"L" "M" "V" "N" "H". I can assign a factor to it: >``` >df$x = as.factor(df$x) >> [1] L M V N H >Levels:...
2020 Oct 31
2
fast way to find most common value across columns dataframe
...x(df),1,Mode) > [1] "C" "B" "D" ">1 mode" ">1 mode" ">1 mode" "D" > [8] "C" "B" ">1 mode" > > Jim > > On Sat, Oct 31, 2020 at 7:56 PM Luigi Marongiu <marongiu.luigi at gmail.com> > wrote: > > > Hello, > > I have a large dataframe (1 000 000 rows, 1000 columns) where the > > columns contain a character. I would like to determine the most common > > character for each row. > > In the example below, I can...
2023 Oct 24
2
How to Calculate the Mean by Multiple Groups in R
...= df[, c("Time", "Target", "Conc")], data = df, FUN = "mean") Time Target Conc OD ODnorm 1 1 BACT 1 765.3333 108.33333 2 1 BACT 2 745.3333 88.33333 3 1 BACT 3 675.0000 18.00000 Sarah On Tue, Oct 24, 2023 at 8:31?AM Luigi Marongiu <marongiu.luigi at gmail.com> wrote: > > Hello, > I have a data frame with different groups (Time, Target, Conc) and > each entry has a triplicate value of the measurements OD and ODnorm. > How can I merge the triplicates into a single mean value? > I tried the following: &g...
2020 Oct 23
2
How to shade area between lines in ggplot2
...several answers using your question > > e.g. > https://stackoverflow.com/questions/54687321/fill-area-between-lines-using-g > gplot-in-r > > Cheers > Petr > > > -----Original Message----- > > From: R-help <r-help-bounces at r-project.org> On Behalf Of Luigi Marongiu > > Sent: Friday, October 23, 2020 9:59 AM > > To: r-help <r-help at r-project.org> > > Subject: [R] How to shade area between lines in ggplot2 > > > > Hello, > > I am running SVM and showing the results with ggplot2. The results include > > the decis...
2020 Oct 31
0
fast way to find most common value across columns dataframe
...rary(prettyR) apply(as.matrix(df),1,Mode) [1] "C" "B" "D" ">1 mode" ">1 mode" ">1 mode" "D" [8] "C" "B" ">1 mode" Jim On Sat, Oct 31, 2020 at 7:56 PM Luigi Marongiu <marongiu.luigi at gmail.com> wrote: > Hello, > I have a large dataframe (1 000 000 rows, 1000 columns) where the > columns contain a character. I would like to determine the most common > character for each row. > In the example below, I can parse one row at the time and find...
2020 Oct 20
2
How to assign the same levels to a dataframe column?
Hello, I have a dataframe df with a column x that has these unique values: "L" "M" "V" "N" "H". I can assign a factor to it: ``` df$x = as.factor(df$x) > [1] L M V N H Levels: H L M N V ``` I now need to get a subset of this dataframe. I could do the same thing as before on the subset sf, but I would like to avoid the possibility that not all
2020 Oct 31
0
fast way to find most common value across columns dataframe
...1] "C" "B" "D" ">1 mode" ">1 mode" ">1 mode" "D" >> [8] "C" "B" ">1 mode" >> >> Jim >> >> On Sat, Oct 31, 2020 at 7:56 PM Luigi Marongiu <marongiu.luigi at gmail.com> >> wrote: >> >> > Hello, >> > I have a large dataframe (1 000 000 rows, 1000 columns) where the >> > columns contain a character. I would like to determine the most common >> > character for each row. >> >...
2020 Oct 31
2
fast way to find most common value across columns dataframe
Hello, I have a large dataframe (1 000 000 rows, 1000 columns) where the columns contain a character. I would like to determine the most common character for each row. In the example below, I can parse one row at the time and find the most common character (apart for ties...). But I think this will be very slow and memory consuming. Is there a way to run it more efficiently? Thank you ``` V =
2012 Sep 18
4
add reference lines (or grid) in background
...in background? I am trying with abline() or grid() but the lines, since they are executed after the plot function, are draw on top. How can I draw such lines beneath the main plot? Here is an example: x<-rnorm(100) boxplot(x) abline(h=c(-1,0,1)) grid(NA, 4, lwd = 2) regards, Luigi Marongiu, MSc [[alternative HTML version deleted]]
2012 Jun 13
2
Median line with stripchart
...ither using the built-in STRIPCHART function or with another package. I was expecting stripchart() to work more or less like boxplot(), but I couldn't find an easy way to draw a mean or median line, neither I found this option in other packages. Could somebody help? Best regards, Luigi Marongiu, MSc [[alternative HTML version deleted]]
2023 Oct 24
2
How to Calculate the Mean by Multiple Groups in R
Hello, I have a data frame with different groups (Time, Target, Conc) and each entry has a triplicate value of the measurements OD and ODnorm. How can I merge the triplicates into a single mean value? I tried the following: ``` df = data.frame(Time=rep(1, 9), Well=paste("A", 1:9, sep=""), OD=c(666, 815, 815, 702, 739, 795, 657, 705, 663),
2020 Jul 14
1
How to install libisl.so.19 on chromebook?
...talling-r-and-rstudio-on-a-chromebook/ the rest, it was done by the system itself... On Tue, Jul 14, 2020 at 1:30 PM Dirk Eddelbuettel <edd at debian.org> wrote: > > > There is something wrong with your system / setup I did not notice first: > > On 14 July 2020 at 13:08, Luigi Marongiu wrote: > | Thank you, it looks like I have already libisl: > | ``` > | apt search libisl > | Sorting... Done > | Full Text Search... Done > | libisl-dbg/oldstable 0.18-1 amd64 > | manipulating sets and relations of integer points bounded by linear > | constraints > | &g...
2020 Oct 27
3
R for-loop to add layer to lattice plot
Hello, I am using e1071 to run support vector machine. I would like to plot the data with lattice and specifically show the hyperplanes created by the system. I can store the hyperplane as a contour in an object, and I can plot one object at a time. Since there will be thousands of elements to plot, I can't manually add them one by one to the plot, so I tried to loop into them, but only the
2020 Oct 28
0
R for-loop to add layer to lattice plot
On Tue, Oct 27, 2020 at 6:04 PM Luigi Marongiu <marongiu.luigi at gmail.com> wrote: > > Hello, > I am using e1071 to run support vector machine. I would like to plot > the data with lattice and specifically show the hyperplanes created by > the system. > I can store the hyperplane as a contour in an object, and I can plo...
2023 Oct 24
1
How to Calculate the Mean by Multiple Groups in R
...", "Conc")], data = df, FUN = "mean") > Time Target Conc OD ODnorm > 1 1 BACT 1 765.3333 108.33333 > 2 1 BACT 2 745.3333 88.33333 > 3 1 BACT 3 675.0000 18.00000 > > Sarah > > On Tue, Oct 24, 2023 at 8:31?AM Luigi Marongiu <marongiu.luigi at gmail.com> wrote: >> >> Hello, >> I have a data frame with different groups (Time, Target, Conc) and >> each entry has a triplicate value of the measurements OD and ODnorm. >> How can I merge the triplicates into a single mean value? >>...