Hallo
Thanks, I will try wat option is better if yours or Kimmo's
Best regards
Petr
> -Original Message-
> From: Bert Gunter
> Sent: Thursday, September 16, 2021 5:00 PM
> To: PIKAL Petr
> Cc: r-help
> Subject: Re: [R] adding results to plot
>
> I was
his:
>
> text(x=0.6, y=1.2, paste0(capture.output(res), collapse="\n"), adj=0)
>
> HTH,
>
> Kimmo
>
> to, 2021-09-16 kello 14:12 +, PIKAL Petr kirjoitti:
> > Virhe vahvistaessa allekirjoitusta: Virhe tulkittaessa Dear all
> >
> > I
Thanks Jim
This seems to be strightforward and quite simple. I considered addtable2plot
but was not sure how to make propper data frame from the result.
Regards
Petr
> -Original Message-
> From: Jim Lemon
> Sent: Friday, September 17, 2021 2:31 AM
> To: PIKAL Petr ; r-
Hm,
Maybe if you change
> C(-7, 7)
Error in C(-7, 7) : object not interpretable as a factor
to
> c(-7, 7)
[1] -7 7
Cheers
Petr
S pozdravem | Best Regards
RNDr. Petr PIKAL
Vedoucí Výzkumu a vývoje | Research Manager
PRECHEZA a.s.
nábř. Dr. Edvarda Beneše 1170/24 | 750 02 Přerov | Czech Repub
Hi
I would print/save iteration number to see at what time this occured and
probably traceback() could give you some hint.
Alternatively you could make a function from your code see ?function and use
debug to trace the error.
Without some working example it is impossible to see where is the probl
.
Thanks and best regards.
Petr
> -Original Message-
> From: Rui Barradas
> Sent: Friday, September 17, 2021 9:56 PM
> To: PIKAL Petr ; r-help
> Subject: Re: [R] adding results to plot
>
> Hello,
>
> *.test functions in base R return a list of class "htest"
Hi
it is not surprising at all.
from apply documentation
Arguments
X
an array, including a matrix.
data.frame is not matrix or array (even if it rather resembles one)
So if you put a cake into oven you cannot expect getting fried potatoes from
it.
For data frames sapply or lapply is pr
Dear all
I know it is quite easy to get a simple seqence by rep function
> c(rep(1:3, 2), rep(4:6,2))
[1] 1 2 3 1 2 3 4 5 6 4 5 6
I could easily get vector of length 24 or 36 using another rep
> rep(c(rep(1:3, 2), rep(4:6,2)),2)
[1] 1 2 3 1 2 3 4 5 6 4 5 6 1 2 3 1 2 3 4 5 6 4 5 6
> length(rep
Hi
I cannot say anything about mutate but
read.csv results in data frame
you can use then
wbpractice$gap <- with(wbpractice, total.food.exp-total.nfood.exp)
Cheers
Petr
BTW, do not use HTML formating your email is a mess.
> -Original Message-
> From: R-help On Behalf Of Admire Tari
Hi.
sometimes is worth to try google first
R fill NA with average
resulted in
https://stackoverflow.com/questions/25835643/replace-missing-values-with-col
umn-mean
and from that
library(zoo)
na.aggregate(DF)
will replace all numeric NA values with column averages.
Cheers
Petr
> -Origin
Hi
One has to be careful when using fractions in seq step.
Although it works for 0.5
> (seq(0,10, .5) - round(seq(0,10,.5),2))==0
[1] TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE
TRUE
[16] TRUE TRUE TRUE TRUE TRUE TRUE
in case of 0.3 (or others) it does not always resul
Hi
Although you got several answers, simple aggregate was omitted.
> with(dat, aggregate(wt, list(Year=Year, Sex=Sex), mean))
Year Sexx
1 2001 F 12.0
2 2002 F 13.3
3 2003 F 12.0
4 2001 M 15.0
5 2002 M 16.3
6 2003 M 15.0
you can reshape the result
>
Hi
Not sure why the date format was changed but if I am correct R do not read
dates as dates but as character vector. You need to transfer such columns to
dates by asDate. The error is probably from your use two asDate commands.
Cheers
Petr
-Original Message-
From: R-help On Behalf Of
Hi
above tapply and aggregate, split *apply could be used)
sapply(with(df, split(z, y)), mean)
Cheers
Petr
> -Original Message-
> From: R-help On Behalf Of Luigi Marongiu
> Sent: Wednesday, November 17, 2021 2:21 PM
> To: r-help
> Subject: [R] vectorization of loops in R
>
> Hello,
>
Hi
You probably has zero hours in all your data
see
> temp
data_POSIX Sensor_code value
1 2002-11-01 00:00:001694 7.2
2 2002-11-01 00:00:001723 10.8
without hours
> as.POSIXct(temp$data_POSIX, format = "%Y-%m-%d %H:%M:%S", tz="Etc/GMT-1")
[1] "2002-11-01 +01" "2002-
Duncan Murdoch
> Sent: Tuesday, November 30, 2021 12:05 PM
> To: Jim Lemon ; PIKAL Petr
>
> Cc: r-help mailing list ; Stefano Sofia
>
> Subject: Re: [R] converting to POSIXct
>
> On 30/11/2021 3:41 a.m., Jim Lemon wrote:
> > Hi,
> > Petr is right. Apparently a
Hi.
It is always worth to consult excellent R help.
max and min return the maximum or minimum of all the values present in their
arguments, as integer if all are logical or integer, as double if all are
numeric, and character otherwise.
Character versions are sorted lexicographically, and this
Dear all
I have data which are either density distribution estimate or cummulative
density distribution estimate (temp1, temp2 below). I would like to get
values (mu, sd) for underlaying original data but they are not available.
I found mixtools package which calculate what I need but it requires
iginal Message-
> From: Bert Gunter
> Sent: Wednesday, December 29, 2021 5:01 PM
> To: PIKAL Petr
> Cc: r-help mailing list
> Subject: Re: [R] mixture univariate distributions fit
>
> No.
>
> However, if the object returned is the "Value" structure of whate
ew year 2022.
Petr
> -Original Message-
> From: Bert Gunter
> Sent: Thursday, December 30, 2021 5:10 PM
> To: PIKAL Petr
> Cc: r-help mailing list
> Subject: Re: [R] mixture univariate distributions fit
>
> Petr:
>
> 1. I now am somewhat confused by your goa
ly way how to procced is to code such function by
myself and take care of suitable starting values.
Best regards.
Petr
> -Original Message-
> From: Ivan Krylov
> Sent: Friday, December 31, 2021 9:26 AM
> To: PIKAL Petr
> Cc: r-help mailing list
> Subject: Re: [R] mixture
need to do
my homework if I decided to code such function myself.
Thank you again and best regards.
Petr
> -Original Message-
> From: Bert Gunter
> Sent: Friday, December 31, 2021 6:57 PM
> To: PIKAL Petr
> Cc: Ivan Krylov ; r-help mailing list project.org>
>
Hi
Try readxl package which has possibility to limit range of cells for
reading.
https://cran.r-project.org/web/packages/readxl/readxl.pdf
Cheers
Petr
> -Original Message-
> From: R-help On Behalf Of Bradley Heins via
> R-help
> Sent: Tuesday, January 4, 2022 4:20 AM
> To: r-help@r-pro
Hi.
Not sure if statistically correct but what about
iris$int<- interaction(iris$bin, iris$Species)
boxM(iris[,1:4], iris[,7])
Cheers
Petr
> -Original Message-
> From: R-help On Behalf Of Luigi Marongiu
> Sent: Tuesday, January 4, 2022 11:56 AM
> To: r-help
> Subject: [R] how to run r
Hi
As Jeff said for data frames you can use split.
If you insist to work with matrices, the principle is similar but you cannot
use split.
mat <- matrix(1:20, 5,4)
mat
[,1] [,2] [,3] [,4]
[1,]16 11 16
[2,]27 12 17
[3,]38 13 18
[4,]49 14 19
[5,
Hi.
Why do you consider it unexpected?
see
map(database = "world", regions = ".", exact = FALSE, boundary = TRUE,
interior = TRUE, projection = "", parameters = NULL, orientation = NULL,
fill = FALSE, col = 1, plot = TRUE, add = FALSE, namesonly = FALSE,
xlim = NULL, ylim = NULL, wrap = FA
---Original Message-
> From: ani jaya
> Sent: Friday, January 7, 2022 9:12 AM
> To: PIKAL Petr ; r-help
> Subject: Re: [R] unexpected (?) behavior of box()
>
> Hi Petr,
>
> Thank you for pointing that out! Silly newbie here.
> So, just want to make sure my
Hi
If you asked google ggtree node label you will get many hits which tell you
how to label nodes
E.g.
https://bioc.ism.ac.jp/packages/3.3/bioc/vignettes/ggtree/inst/doc/treeAnnot
ation.html
And you will get it much more quickly than by asking here.
Cheers
Petr
> -Original Message-
> F
Hallo all
I do not consider answers here unresponsive or unfriendly. Most answers point
to the way how to procced and solve the problems. Although RTFM is sometimes
the best what anybody can do (and I did it myself around 1997 when I started
with R). Hardly anybody here is flamed when he/she as
Hallo
You should explain better what do you want as many people here do not use
tidyverse functions.
I am not sure what the function should do.
table(iris$Species)
give the same result and whatever you do in tidyverse part it always finalise
in table(...$Species)
Cheers
Petr
> -Original M
Hi
Do not post in HTML, please.
Try to show your real data - use str(test), or preferably dput(test). If
test is big, use only fraction of it
The problem must be probably in your data.
x <- sample(1:20, 100, replace=T)
fake <- paste("T", x, sep="")
ifelse(fake=="T14", 1,0)
[1] 0 0 0 0 0 0 0 0
Hi
It seems that you are hiding what you really do.
This
> options(error = NULL)
works fine without any error. So please If you want some reasonable answer
post question with data and code which is causing the error.
My wild guess is that you have some objects in your environment and you do
not
t;- ifelse(test$operator == 'T13', 1, 0)
the most probable source of the error is
fc= fairness_check(explainer,
protected = prot,
privileged = privileged)
so you should check explainer and privileged
Cheers
Petr
From: javed khan
Sent: We
Hi
Is it enough for explanation?
https://stats.stackexchange.com/questions/26176/removal-of-statistically-sig
nificant-intercept-term-increases-r2-in-linear-mo
https://stackoverflow.com/questions/57415793/r-squared-in-lm-for-zero-interc
ept-model
Cheers
Petr
> -Original Message-
> From:
Hi
1. Do not use HTML formated mail, your message is scrambled
2. With your code only you can get result all of us get error
> Mod = lm(as.numeric(data[,"meanMSD25"])~(as.numeric(data[,"Slice"])),
> weights=1*sqrt(as.numeric(data[,"Detec"])))
Error in data[, "meanMSD25"] :
object of type 'clo
Hallo
It is not obvious what is your problem. You maybe should go through some
articles about functions in the package.
https://pdfs.semanticscholar.org/aee5/cca63aad422c96ee637b5561bb051724d76c.pdf?_ga=2.241710466.1872226166.1648790330-1600227915.1617009045
or maybe you do not have Rgraphviz pa
Hi.
Beside advice of others, at least
str(yourdata)
and the ggplot code is minimum for us to be able to offer some advice.
Preferable way how to send your data is output from
dput(yourdata) or dput(head(yourdata))
Just copy paste to your email.
Cheers
Petr
> -Original Message-
> Fro
Hallo
I do not have much experience with Linux, Rstudio and ESS, but you can
customise R startup by .Rprofile.site .Rconsole files which are situated in
/etc directory of your installation
You can find some info about it in Rintro chapter
10.8 Customizing the environment
Cheers
Petr
> -Origi
Hallo all
Here are the data from dput
test <- structure(list(Sample = c("A", "A", "A", "A", "A", "A", "B",
"B", "B", "B", "B", "B", "C", "C", "C", "C", "C", "C"), SSAtype = c("one",
"one", "one", "two", "two", "two", "one", "one", "one", "two",
"two", "two", "one", "one", "one", "two", "
data frame?
Best regards
Petr
> -Original Message-
> From: Rui Barradas
> Sent: Monday, May 16, 2022 1:53 PM
> To: PIKAL Petr ; r-help@r-project.org
> Subject: Re: [R] ggplot pointrange from other df and missing legend
>
> Hello,
>
> In the code below the legen
Hi
Strange, you say
> prot <- ifelse(test$CE == '2', 1, 0) /// Error comes here
but with your data
ifelse(test$CE == '2', 1, 0)
[1] 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
1 1
[38] 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0
0 0
factor function.
You probably modified the code from help page but in that case you should
check if all your objects are the same mode and structure as the objects in
help page code.
Cheers
Petr
From: Neha gupta
Sent: Friday, May 20, 2022 3:22 PM
To: PIKAL Petr
Cc: r-help mailing list
Subject: R
Hallo all
Various suggestion were made but with this simple task I immediatelly
thought about reshape2 melt function.
x <- "Time_stampP1A0B0D P190-90D
'Jun-10 10:34' -0.000208 -0.000195
'Jun-10 10:51' -0.000228 -0.000188
'Jun-10 11:02' -0.000234 -0.000204
'Jun-10 11:17' -0.00022
Hi
Maybe
lapply(mydf.split, function(x) aggregate(x[,4:5], list(x$date), sum))
For your particular case, but lacking overall genarality.
Cheers
Petr
> -Original Message-
> From: R-help On Behalf Of Naresh Gurbuxani
> Sent: Friday, July 1, 2022 1:08 PM
> To: r-help@r-project.org
> Subje
Hi.
>From what you say, plain "rbind" could be used, if the columns in both sets
are the same and in the same order. After that you can reorder the resulting
data frame as you wish by "order". AFAIK for most functions row order in
data frame does not matter.
Cheers
Petr
> -Original Message--
type.
To get more specific answer you need to ask specific question preferably with
some data included (most preferably by dput command) and error message.
Cheers
Petr
From: Ranjeet Kumar Jha
Sent: Wednesday, July 27, 2022 8:35 AM
To: PIKAL Petr
Cc: R-help
Subject: Re: [R] Ne
Hallo
Merge
df3 <- merge(df1, df2, all=T)
> head(df3)
y d h ws
1 2010 1 1 NA
2 2010 1 2 NA
3 2010 1 3 20.4631367884005
4 2010 1 3 NA
5 2010 1 4 NA
6 2010 1 5 NA
Cheers
Petr
> -Original Message-
> Fro
Hallo
And missing value interpolation is rather tricky business dependent on what
is underlying process.
Maybe na.locf from zoo package?
Or approxfun?, splinefun?
Cheers
Petr
> -Original Message-
> From: R-help On Behalf Of javad bayat
> Sent: Wednesday, August 31, 2022 8:09 AM
> To:
Dear all
After we installed new R version R 4.2.1 installing packages through IE
proxy setting is compromised with warning that R could not connect to server
(tested in vanilla R).
> chooseCRANmirror()
Warning: failed to download mirrors file (cannot open URL
'https://cran.r-project.org/CRAN_mirr
Thanks,
the workaround works but we need try the "permanent" solution with
Renviron.site file in future.
Cheers
Petr
> -Original Message-
> From: Ivan Krylov
> Sent: Tuesday, October 4, 2022 5:43 PM
> To: PIKAL Petr
> Cc: r-help mailing list
> Subj
r 6, 2022 1:09 PM
> To: r-help@r-project.org; PIKAL Petr
> Subject: Re: [R] R version 4.2.1 install.packages does not work with IE
proxy
> setting
>
> Petr,
> You also might want to check out the bug reported here:
>
> https://bugs.r-project.org/show_bug.cgi?id=18379
&
Hallo Marine
Could you please make your example more reproducible by using set.seed (and
maybe smaller)?
If I understand correctly, you want to know if let say row 1 items from df2
(8,16) are both in item column of specific id?
If I am correct in guessing, I cannot find another solution than spl
Hi
another option is to use SendTo folder. This was easy to find in older
Windows versions. Now the easiest way is:
Press the Windows Key + R to trigger the Run window. At the Open field in
the window, type shell:SendTo and then click OK
And SendTo folder should open.
You can then add link to
Hallo all
I found a strange problem for coding if part of list is NULL.
In this case, sapply result is ***list of data frames*** but if there is no
NULL leaf, the result is ***list of vectors***.
I tried simplify option but it did not help me neither I found anything in
help page.
The
2022 1:37 PM
> To: PIKAL Petr
> Cc: R-help Mailing List
> Subject: Re: [R] data frame returned from sapply but vector expected
>
> On Fri, 4 Nov 2022 15:30:27 +0300
> Ivan Krylov wrote:
>
> > sapply(mylist2, `[[`, 'b')
>
> Wait, that would simplify t
Hallo all
Not sure if it is appropriate place but as I am not involved in r-devel list
I post here.
Documentation for Control (if, for, while, .) is missing "if else" command.
Although it can be find online elsewhere I believe that adding it either as
an example or as a third entry and para
more than expected")}
to the help page for if.
Regards
Petr
> -Original Message-
> From: Martin Maechler
> Sent: Wednesday, December 7, 2022 12:16 PM
> To: PIKAL Petr
> Cc: R-help Mailing List
> Subject: Re: [R] if documentation
>
> >>>>> PIKAL Petr
Hallo Mukesh
R project is not Microsoft or Oracle AFAIK. But if you need some certificate
you could take courses on Coursera, they are offering certificates.
Cheers
Petr
> -Original Message-
> From: R-help On Behalf Of Mukesh
> Ghanshyamdas Lekhrajani via R-help
> Sent: Monday, January
Hallo Thomas
Similar as suggested by Rui, you shall change your date to real date e.g. by
library(lubridate)
date <- paste(date, c(rep(2022,2), 2023), sep="-")
date <- mdy(date)
and you need to change also x coordinate in annotate.
ggplot(data, aes(x=date,y=PT,group=1))+
geom_point(size=4)+
Hi
Attachments are mostly removed from emails so they probably will not reach
r-help.
You said you get an error, which is the first place you should look at. It
can navigate you to the source of the error if you read it carefully.
Anyway, if your code is complicated it is difficult to understand
fill = "darkgrey")
Cheers
Petr
And I do not provide private consulting so keep your posts to R help. Others
may have much more insightful answers.
From: Upananda Pani
Sent: Wednesday, January 11, 2023 2:43 PM
To: PIKAL Petr
Subject: Re: [R] Reg: ggplot error
Hi Res
Hallo Dennis
Is the STRING in R still containing **≥** character?
Or it was converted during reading to R to ...?
What dput(STRING) result i?
Cheers
Petr
> -Original Message-
> From: R-help On Behalf Of Dennis Fisher
> Sent: Monday, January 16, 2023 9:19 AM
> To: r-help@r-project.org
Hallo Sacha
AFAIK the functions in FactoMineR do not enable to manipulate label size. Plot
is performed by this part:
if (graph & (ncp > 1)) {
print(plot(res, axes = axes))
if (!is.null(quanti.sup))
print(plot(res, choix = "quanti.sup", axes = axes,
ne
Dear all
I have this table
> dput(mat)
mat <- structure(c(2, 16, 9, 2, 16, 1, 1, 4, 7, 7, 44.52, 42.8, 43.54,
40.26, 40.09), dim = c(5L, 3L))
And I want to calculate result for contour or image plots as I did few years
ago.
However interp does not compute the z values and gives me zeros in z m
Hallo Duncan
Thanks, I was not aware of this package. I will try.
Petr
> -Original Message-
> From: Duncan Murdoch
> Sent: Thursday, January 26, 2023 3:44 PM
> To: PIKAL Petr ; r-help@r-project.org
> Subject: Re: [R] akima interp results to zero with less than 10 value
Hallo Carolyn
>From what you describe you cannot calculate correlations.
You stated that you have two sets of data, one for December and one for
March and that rows in one set is not related to the rows in another set and
even persons tested in both months do not have their values on the same row
Hi Konstantinos
Not exactly derivative but
> diff(df[,2])
[1] -0.01 -0.01 -0.01 -0.01 0.00 0.01 -0.02 -0.03 -0.02
May be enaough for you.
Cheers
Petr
>
> -Original Message-
> From: R-help On Behalf Of konstantinos
> christodoulou
> Sent: Tuesday, January 31, 2023 10:16 AM
> To: r-hel
Hi Naresh
If you wanted to automate the function a bit you can use sapply to find
numeric columns
ind <- sapply(mydf, is.numeric)
and use it in apply construct
apply(mydf[,ind], 1, function(row) sum(row))
[1] 2.13002569 0.63305300 1.48420429 0.13523859 1.17515873 -0.98531131
[7] 0.4704446
Hi
Others gave you more fundamental answers. To check the possible distribution
you could use package
https://cran.r-project.org/web/packages/fitdistrplus/index.html
Cheers
Petr
> -Original Message-
> From: R-help On Behalf Of Bogdan Tanasa
> Sent: Wednesday, February 8, 2023 5:35 PM
>
Hallo
Excel attachment is not allowed here, but shading area is answered many times
elsewhere. Use something like . "shading area r" in google.
See eg.
https://www.geeksforgeeks.org/how-to-shade-a-graph-in-r/
Cheers Petr
-Original Message-
From: R-help On Behalf Of George Brida
Sent:
Dear all.
I am trying to install missing (not installed) packages during startup of R
through code in Rprofile.site but I miserably failed and I am not sure what
I am doing wrong.
R is installed to C:Program files but it is not writable for the users,
therefore I cannot change Rprofile.site
their .Rprofile to get customised way how to start R.
Best regards
Petr
> -Original Message-
> From: Duncan Murdoch
> Sent: Tuesday, March 21, 2023 1:55 PM
> To: PIKAL Petr ; r-help
> Subject: Re: [R] Rprofile.site and automatic installation of missing
> packages
>
&g
ASS)
#**
test <-(scan("pack.txt", character(), quote = ""))
x<- utils::installed.packages()
utils::install.packages(test[!test %in% x], repos="https://cloud.r-project.org";)
##**
Options are set and working.
MASS should be loaded but is not
>
for my questions, it is something I never done before but I now need to
resolve it in a way which fits to our IT environment.
Best regards.
Petr
-Original Message-
From: Duncan Murdoch
Sent: Tuesday, March 21, 2023 5:43 PM
To: PIKAL Petr ; r-help
Subject: Re: [R] Rprofile.site and au
Hi
You need to use paired option
> t.test(x=0:4, y=sample(5:9), paired=TRUE)$estimate
mean difference
-5
Cheers
Petr
> -Original Message-
> From: R-help On Behalf Of Samuel Granjeaud
> IR/Inserm
> Sent: Sunday, April 2, 2023 11:39 PM
> To: r-help@r-project.org
> Subject: [
t or two sample paired test"
Cheers
Petr
> -Original Message-
> From: Samuel Granjeaud IR/Inserm
> Sent: Monday, April 3, 2023 1:25 PM
> To: PIKAL Petr ; r-help@r-project.org
> Subject: Re: [R] Should help of estimate in t.test be corrected?
>
> Hi
>
> Than
Hi
I wonder why such combination is so complicated in your text book.
Having data frames fr1 and fr2
> dput(fr1)
structure(list(Fruit = structure(c(1L, 3L, 2L), .Label = c("banana",
"mango", "pear"), class = "factor"), Calories = c(100L, 100L,
200L)), class = "data.frame", row.names = c("1", "2"
Hi
seems to me simple
Sample data
> nozero <- c(1565, 1569, 1674, 415, 1564)
> test <- sample(c(1:10, nozero), 250, replace=T)
> test
[1] 10264 41559 1565 15692 10 1569 415 15693
[16]49 10115 1013 109 15644 108
Hi
Keep posts also to r-help, others could give you different/better solutions.
Regarding ordering, see ?order or ?sort. However this is mainly necessary only
for plotting or exporting data.
Cheers
Petr
From: Drake Gossi
Sent: Thursday, April 18, 2019 9:27 PM
To: PIKAL Petr
Subject: Re: [R
Hi
Structure is usefull for exchanging information and it is result of ?dput
function. I wonder if anybody would like to use it for **creating** data frames.
For creating data frames see functions like
?read.table,
?read.delim,
or other ?read.* functions.
Your questions are mainly adressed in
Hi
Your question is barely understandable. Maybe you wanted
?aggregate
but without further precisement it is difficult to provide definitive answer.
Cheers
Petr
> -Original Message-
> From: R-help On Behalf Of ajaykumar cp
> Sent: Wednesday, April 17, 2019 4:31 PM
> To: r-help@r-proje
Hi
Maybe you could think about transfering **script** to **function**.
In function your construction seems to be OK.
Cheers
Petr
> -Original Message-
> From: R-help On Behalf Of Luigi Marongiu
> Sent: Thursday, April 18, 2019 4:11 PM
> To: r-help
> Subject: [R] Pause script at input f
Hi.
Most probably SMSSpamCollection$Message is not character, corpus or tokens
object (which error message politely suggests).
You need to change it to be correct mode
functions ?str, ?mode, ?typeof
to see your objects.
And maybe also R intro chapter about objects and its differences.
Cheers
Hi
Maybe ?sample within cycle? And collecting results in list.
Cheers
Petr
> -Original Message-
> From: R-help On Behalf Of Thevaraja,
> Mayooran
> Sent: Wednesday, June 5, 2019 4:38 AM
> To: r-help@r-project.org
> Subject: [R] How to generate mutiple set of samples in R?
>
> Hello
>
>
Hi Mayooran
It is better to keep your mails on rhelp. Others could answer too.
see in line
> -Original Message-
> From: m.thevar...@massey.ac.nz
> Sent: Wednesday, June 5, 2019 11:55 AM
> To: PIKAL Petr
> Subject: Re: How to generate mutiple set of samples in R?
Hi
It is probably time to consult documentation, including R-Intro. GGplot
paradigm is that you have set of values (x,y) and factor variable(s) used for
changing colour, size, plotting character or several other plot items.
so something like
pl <- ggplot(NewestdataULTRA, aes(x=x, y=value, colou
Dear all
I have a question about debug function. I did not use it for long time but my
vague memory tell me, that when I used debug(myfunction) in past, only
myfunction was debugged and browser ignored any embedded function.
example (simple)
fff <- function(x) mean(x, na.rm=T)
when I issue
>
d be worth considering to add something about it
to debug help page.
Best regards
Petr
> -Original Message-
> From: Duncan Murdoch
> Sent: Thursday, June 6, 2019 11:11 AM
> To: PIKAL Petr ; r-help@r-project.org
> Subject: Re: [R] debug only top level function
>
> On 0
Hi
Probably missing quotation marks in geom_smooth
geom_smooth(method = "lm", se = FALSE)
Cheers
Petr
> -Original Message-
> From: R-help On Behalf Of rain1290--- via R-
> help
> Sent: Thursday, June 6, 2019 4:35 PM
> To: ruipbarra...@sapo.pt; r-help@R-project.org
> Subject: Re: [R] Pl
Attachments are not alowed (mostly) on this list.
Use ?dput to show your data or at least part of your data illustrating the
problém.
Cheers
Petr
-Original Message-
From: R-help On Behalf Of Subhamitra Patra
Sent: Tuesday, June 11, 2019 8:05 AM
To: ঋষি ( ऋषि / rIsHi )
Cc: r-help maili
Hi
Ts should be numeric matrix if I read the help page correctly. However I get
different error message
> k2 <- kmeans(ts, centers = 2, nstart = 25)
Error in do_one(nmeth) : NA/NaN/Inf in foreign function call (arg 1)
In addition: Warning message:
In storage.mode(x) <- "double" : NAs introduced
From: Bert Gunter
Sent: Tuesday, June 11, 2019 3:15 PM
To: PIKAL Petr
Cc: Subhamitra Patra ; Jim Lemon
; r-help mailing list
Subject: Re: [R] Changing the label name in the plot
There appear to be two columns with the same name. Surely this will cause
problems.
Bert Gunter
"The trou
Hi
I do not use this package but this is written in manual:
Custom splitting: All families except unsupervised are available for user
defined custom
splitting. Some basic C-programming skills are required. The harness for
defining these
rules is in splitCustom.c. In this file we give examples o
Hi
I may be completely missing your point but maybe simple
geom_vline(xintercept = as.POSIXct("2019-06-11"))
is what you want.
Something like
ggplot(aes(Date2,NetEditRev)) +
geom_line(alpha=0.5, color = "#2c3e50") +
geom_smooth(method = "loess", span= 0.5) +
theme_tq() +
scale_y_contin
Hi
Do you insist to use matrix?
If you change matrix to data frame it returns NA as required.
mdat
C.1 C.2 C.3
row1 1 2 3
row2 11 12 13
> mdat["some",]
Error in mdat["some", ] : subscript out of bounds
> mdatf<-as.data.frame(mdat)
> mdatf["some",]
C.1 C.2 C.3
NA NA NA NA
Che
Hi
I does not use Deducer so I do not know if it has some features for such task
In plain R instead
file.names <- dir(pattern = "*.txt")
use
file.names <- list.files(pattern = "*.txt")
for(i in 1:length(file.names)){file <-
> read.table(file.names[i],header=TRUE) #
Here you want to change zero
Hi
Google tells it to you in seconds
https://stackoverflow.com/questions/13575180/how-to-change-language-settings-in-r
BTW this was the first hit from phrase
R how to change the language interface
Cheers
Petr
> -Original Message-
> From: R-help On Behalf Of CHATTON Anne
> via R-help
Or maybe use stack
stack(mydf)
Cheers
Petr
> -Original Message-
> From: R-help On Behalf Of Jim Lemon
> Sent: Tuesday, September 10, 2019 6:34 AM
> To: smart hendsome ; r-help mailing list h...@r-project.org>
> Subject: Re: [R] Moving 2nd column into 1st column using R
>
> Hi Zuhri,
>
Dear all
Is there any simple way checking whether after calling pdf device something was
plotted into it?
In interactive session I used
if (dev.cur()==1) plot(ecdf(rnorm(100))) else plot(ecdf(rnorm(100)), add=T,
col=i)
which enabled me to test if plot is open
But when I want to call eg. pdf("
er it is finished to pdf.
The only obstacle is that my code flashes during plotting to basic device,
however I can live with it.
Thank you again and best regards
Petr
> -Original Message-
> From: Duncan Murdoch
> Sent: Thursday, September 12, 2019 2:29 PM
> To: PIKAL Petr
801 - 900 of 1453 matches
Mail list logo