d or something) is written in between C and R
> > giving C ODE R,
> >
> > ...
> >
> >
> > Very happy to be corrected...
> >
> >
> > (Oh and as a third part a coder writes in C or R... I hope the
> > JavaScript kids are listening ;-) )
> &
e other.
>
> -Original Message-
> From: R-help On Behalf Of Erin Hodgess
> Sent: Thursday, December 12, 2024 11:56 AM
> To: Bill Dunlap
> Cc: r-help@R-project.org
> Subject: Re: [R] [off-topic] crossword
>
> [External Email]
>
> RULES!
>
>
> Erin
The New York Times crossword this morning had the clue (51 down, 5 letters)
"Writes in C or R, say".
-Bill
[[alternative HTML version deleted]]
__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/li
Here is the skeleton of a function that lets you supply a function that
will be applied to diff(y) to say if this next point should be connected by
a line to the previous point.
p <- function (x, y = NULL, dy = diff(y), predicate = function(dy)
abs(dy)>2, ...,
xlab = if (!missing(x)) deparse1(su
MKL's results can depend on the number of threads running and perhaps other
things. They blame it on the non-associativity of floating point
arithmetic. This article gives a way to make results repeatable:
https://www.intel.com/content/www/us/en/developer/articles/technical/introduction-to-the-c
It is safer to use !grepl(...) instead of -grep(...) here. If there are no
matches, the latter will give you a zero-row data.frame while the former
gives you the entire data.frame.
E.g.,
> d <- data.frame(a=c("one","two","three"), b=c(10,20,30))
> d[-grep("Q", d$a),]
[1] a b
<0 rows> (or 0-lengt
> The only difference is the use of ’=’ or ‘<-‘ to assign the p value of
the fisher test to the vector. I stopped using ‘<-‘ eons ago so it took a
bit to figure out.
The '=' has a context-dependent meaning - in a function call it is used to
name arguments and outside of a function call it is use
I think that using complex numbers to represent the wind velocity makes
this simpler. You would need to write some simple conversion functions
since wind directions are typically measured clockwise from north and the
argument of a complex number is measured counterclockwise from east. E.g.,
wind
https://bugs.r-project.org/show_bug.cgi?id=16745 (from 2016, still labelled
'UNCONFIRMED") contains some other examples of strsplit misbehaving when
using 0-length perl look-behinds. E.g.,
> strsplit(split="[[:<:]]", "One, two; three!", perl=TRUE)[[1]]
[1] "O" "n" "e" ", " "t" "w" "o" "; "
The HH Size is the problem - it doesn't follow R's rules for a name. Put
backticks around it: `HH Size`.
-Bill
On Tue, Mar 21, 2023 at 9:47 AM Nandini raj
wrote:
> Respected sir/madam
> can you please suggest what is an unexpected symbol in the below code for
> running a multinomial logistic r
Look into R's scoping rules. E.g.,
https://bookdown.org/rdpeng/rprogdatascience/scoping-rules-of-r.html.
* When a function looks up a name, it looks it up in the environment in
which the function was defined.
* Functions in a package are generally defined in the package's environment
(although so
The -grep(pattern,colnames) as a subscript is a bit dangerous. If no
colname matches the pattern then all columns will be omitted (because -0 is
the same as 0, which means no column). !grepl(pattern,colnames) avoids this
problem.
> mydata <- data.frame(A=1:3,B=11:13)
> mydata[, -grep("^yr", colna
R's
{ expr1; expr2; expr3}
acts much like C's
( expr1, expr2, expr3)
E.g.,
$ cat a.c
#include
int main(int argc, char* argv[])
{
double y = 10 ;
double x = (printf("Starting... "), y = y + 100, y * 20);
printf("Done: x=%g, y=%g\n", x, y);
return 0;
}
$ gcc -Wall a.c
$ ./a.
I find your original sapply(List, function(element)element$name) easy to
understand. However replacing sapply with vapply makes for more robust
code. vapply requires you to supply the expected mode (type) and length of
element$name and if any of the elements don't comply with that, vapply
gives a
Note that 3221226505 in base 10 is C409 in hexadecimal. You may have
better luck looking for causes of this by googling the hex representation.
-Bill
On Sun, Dec 18, 2022 at 3:56 PM Mathurin, Gottfried via R-help <
r-help@r-project.org> wrote:
> Hello,
> I currently face the issue of Window
I think that
is.na(x) <- i
generally does the same to x as does
x[i] <- NA
I say 'generally' because some classes (e.g., numeric_version) do not allow
x[i]<-NA but do allow is.na(x)<-i. It is possible that some classes mess
up this equivalence, but I think that would be considered a bug.
-
summary(Base)
would show if one of columns of Base was read as character data instead of
the expected numeric. That could cause an explosion in the number of dummy
variables, hence a huge design matrix.
-Bill
On Fri, Nov 11, 2022 at 11:30 PM George Brida
wrote:
> Dear R users,
>
> I have a d
There probably is a package with such a function, but you can do with one
call to sub() if you parenthesize all the subexpressions in the regular
expression and use \\1, etc., in the replacement for those parts you want
to keep. E.g.,
> s <- ""
> want <- ""
> new_regexp <- "(.*<[^>]+ data-pos=\"
Do you have another function called "cat" in scope? (with an argument
called "j")? Before calling cat("...") call print(cat) and
print(find("cat")).
-Bill
On Thu, Oct 13, 2022 at 12:35 AM Steven T. Yen wrote:
> I have had an issue with printing (with cat) in a subroutine for which I
> do not
Here is how you could have made an example that helpers could easily run.
It also includes the fix.
f <- function(print.it = FALSE) {
pdf(file.pdf <- tempfile(fileext=".pdf"))
series <- as.xts(setNames(sin(seq(0,10,by=.1)),
seq(as.Date("2022-10-06"),by="weeks",len=101)))
p <- plot(series)
?var
E.g.,
> x <- mvtnorm::rmvnorm(1e5, mean=101:105, sigma=matrix(1,5,5)+diag(11:15))
> dim(x)
[1] 10 5
> var(x)
[,1] [,2] [,3] [,4] [,5]
[1,] 11.9666055 1.0603876 0.9627672 1.0371084 0.983217
[2,] 1.0603876 13.0774518 1.0228972 0.9261868 1.0597
The same is true for any function call; switch() is not special in this
regard.
> f <- function(x, ...) list(...)
> f("x"=1, "2"=2, `3`=3)
$`2`
[1] 2
$`3`
[1] 3
The backticks are required when defining a function with a non-syntactical
name, but the call can use either form.
> f <- function(x,
The order of the rows returned by summarize is controlled by the levels of
the factors given to group_by. If group_by is given character columns
instead of factors, it converts them to factors with the levels being the
sorted unique values of the character columns. Convert you character
columns t
I think the intent of this code was to see if the formula had solely a
literal 1 on the right hand side.
Then !identical(pp[[3]], 1) would do it, avoiding the overhead of calling
deparse. Note that the
1 might be an integer, which the current code would (erroneously) not
catch, so
!identical(pp
You could write a function that returns an environment (or list if you
prefer) containing the results collected before the interrupt by using
tryCatch(interrupt=...). E.g.,
doMany <- function(names) {
resultEnv <- new.env(parent=emptyenv())
tryCatch(
for(name in names) resultEnv[[
Is there an environment variable containing that IP address?
as.list(grep(value=TRUE, "172", Sys.getenv())) # as.list to make
printing nicer
If you know which variable is causing the problem you may be able to
override it by setting an R-specific one.
-Bill
On Fri, Jun 17, 2022 at 8:28 AM
You could write a function that deals with one row of your data, based on
the order() function. E.g.,
> to_10_30_50
function(x) {
stopifnot(is.numeric(x), length(x)==3, sum(x)==90, all(x>0))
c(10,30,50)[order(x)]
}
> to_10_30_50(c(23,41,26))
[1] 10 50 30
Then loop over the row
The answer depends on the encoding of the file containing the Chinese
characters and on the version of R (since you are using Windows). I copied
your subject line into Wordpad and and added some syntax to make a valid R
expression
s <- "永创 via R-help"
I then saved it with the type "Unicode Text
ays suggest working until the model works, no errors and no NA
> values. The reason is that I can get NA in several ways and I need to
> understand why. If I just ignore the NA in my model I may be assuming the
> wrong thing.
>
>
>
> Tim
>
>
>
> *From:* Bill Dunlap
ike summarize(y) or mean(y) if that was the goal.
>
> Tim
>
> -Original Message-
> From: R-help On Behalf Of Bill Dunlap
> Sent: Wednesday, April 13, 2022 9:56 AM
> To: Neha gupta
> Cc: r-help mailing list
> Subject: Re: [R] Error with text analysis data
>
&
This sounds like what I think is a bug in stats::model.matrix.default(): a
numeric column with all identical entries is fine but a constant character
or factor column is not.
> d <- data.frame(y=1:5, sex=rep("Female",5))
> d$sexFactor <- factor(d$sex, levels=c("Male","Female"))
> d$sexCode <- as.i
stats::approx can do the job:
> approx(x=df$seq, df$count, xout=1:7, method="constant", f=0)
$x
[1] 1 2 3 4 5 6 7
$y
[1] 4 7 7 3 5 5 2
-Bill
On Tue, Mar 29, 2022 at 7:47 PM Jeff Reichman
wrote:
> R-help
>
> Is there a R function that will insert missing sequence number(s) and then
> fill a mi
: %s \n", bar, (bar > 1.0 ? "true" : "false"));
> }
>
> gcc c-check.c -o c-check
> ./c-check
> foo: 1.00 , foo > 1: false
> bar: 1.00 , bar > 1: true
>
> Again, it was my mistake for not reading the R-FAQ. I had no idea it would
>
The base 2 representation of 0.4 repeats the digit sequence 1001
infinitely, hence must be rounded. The problem occurs in C the same as it
does in R.
bill@Bill-T490:~$ cat a.c
#include
int main(int argc, char* argv[])
{
double d = 0.4 + 0.3 + 0.2 + 0.1;
printf("0.4+0.3+0.2+0.1 -> %24.17
> fraction <- 0/0
> if (fraction < .5) TRUE else FALSE
Error in if (fraction < 0.5) TRUE else FALSE :
missing value where TRUE/FALSE needed
-Bill
On Fri, Jan 14, 2022 at 12:55 PM Bert Gunter wrote:
> Unlikely.
>
> > 1/0
> [1] Inf ## not NA
>
> Bert
>
> On Fri, Jan 14, 2022 at 12:41 PM Jim Le
Suppose your data were represented as parallel vectors "time" and "type",
meaning that at time[i] a type[i] event occurred. You didn't say what you
wanted if there were a run of "A" or "B". If you are looking for the time
span between the last of a run of one sort of event and the first of a run
And how does one [easily] download those files from sourceforge?
-Bill
On Wed, Jan 5, 2022 at 10:15 AM Chuck Coleman via R-help <
r-help@r-project.org> wrote:
> This is a rather complex error, for which I created
> https://sourceforge.net/projects/rhelp/files/Metro/ to hold a minimal
> workspace
This is the sort of thing that you should first ask the package maintainer
about; there is an error in the rdf method for write_nquads:
> rdflib:::write_nquads.rdf
function (x, file, ...)
{
rdf_serialize(rdf, file, "nquads", ...)
}
I suspect that the first argument to rdf_serialize should be
And a fourth thing to do:
* dput(tail(n=20, readBin(".RData", what=raw(), n=file.size(".RData"
This can show if the file got truncated.
-Bill
On Thu, Dec 23, 2021 at 5:25 PM Bill Dunlap
wrote:
> Three things you might try using R (and show the results in this emai
Three things you might try using R (and show the results in this email
thread):
* load(verbose=TRUE, ".RData") # see how far it gets before stopping
* file.info(normalizePath(".RData")) # is this the file you think it is?
* dput(readBin(".RData", what=raw(), n=100))
The last will print some hex n
"
[15] "C:\\Users\\willi\\AppData\\Local\\GitHubDesktop\\bin"
> table(grepl("$", strsplit(Sys.getenv("PATH"), ";")[[1]])) # c. 2:1
against terminal backslash
FALSE TRUE
15 8
On Mon, Dec 20, 2021 at 9:30 AM Martin Maechler
wrote:
> >
>
> > Why would one ever *add* a final unneeded path separator,
> > unless one wanted it?
>
Good question, but it is common for Windows installer programs to add a
terminal backslash to PATH entries. E.g., on my Windows laptop I get
> grep(value=TRUE, "$", strsplit(Sys.getenv("PATH")
On the 'bad' machines, what did you get for
summary(fit)
summary(k)
summary(Z)
summary(gm*gsd^Z)
?
-Bill
On Thu, Dec 2, 2021 at 6:18 AM Labone, Thomas wrote:
> In the code below the first and second plots should look pretty much the
> same, the only difference being that the first h
The following makes degree signs appropriately, as shown in ?plotmath:
plot(68, 20, xlab=expression(degree*F), ylab=expression(degree*C))
If you want the word "degree" spelled out, put it in quotes.
-Bill
On Tue, Nov 30, 2021 at 12:31 PM Rich Shepard
wrote:
> On Tue, 30 Nov 2021, Rich Shepa
You can use as.matrix() to convert your data.frame to a matrix, but that
loses the speed/space advantages of colMins (as well as causing issues if
some columns are not numeric). You could write to the maintainer of the
package to ask that data.frames be directly supported. In the meantime you
cou
Did the 3 warnings come from three separate calls to read_csv? If so, can
you identify which files caused the warnings? E.g., change the likes of
lapply(files, function(file) read_csv(file, ...))
to
options(warn=1) # report warnings immediately
lapply(files, function(file){ cat(file, "\n
Try using at=c(1.8, 2.8) to specify the contour levels you want (and omit
the cuts= argument).
-Bill
On Wed, Nov 17, 2021 at 5:41 AM Luigi Marongiu
wrote:
> I have a dataframe of three variables: x, y, z. The value of z are:
> ```
> > unique(df$z)
> [1] 1.0 1.2 1.4 1.6 1.8 2.0 2.2 2.6 3.0 2.4 2
I googled for "ggplot2 boxplots by group" and the first hit was
https://www.r-graph-gallery.com/265-grouped-boxplot-with-ggplot2.html
which displays lots of variants along with the code to produce them. It
has links to ungrouped boxplots and shows how violin plots can better
display your data.
The error message arises because you are sometimes delimiting character
strings using non-ASCII open and close double quotes, '“' and '”', instead
of the old-fashioned ones, '"', which have no open or close variants. This
is a language syntax error, so R didn't try to compute anything.
The others
Note that an environment carries a hash table with it, while a named list
does not. I think that looking up an entry in a list causes a hash table
to be created and thrown away. Here are some timings involving setting and
getting various numbers of entries in environments and lists. The times
ar
Use the col_type argument to specify your column types. [Why would you
expect '2009' to be read as a string instead of a number?]. It looks like
an
initial zero causes an otherwise numeric looking entry to be considered
a string (handy for zip codes in the northeastern US).
help(read_csv) says t
s Sanitizer (ASan) and the
>> UndefinedBehaviorSanitizer (UBSan). Those have helped me in the past
>> to track down mistakes, and even spot things I was not aware of. And
>> it's an ease of mind as a developer when these tools and Valgrind
>> checks give all OK reports.
I agree with Stefan. Try using valgrind (on Linux) to check for memory
misuse:
R --debugger=valgrind --debugger-args="--leak-check=full
--track-origins=yes"
...
> yourTests()
> q("no")
-Bill
On Fri, Oct 22, 2021 at 7:30 AM Stefan Evert
wrote:
> Just to add my personal cent to this: I've had
You can define the environment variable R_DONT_USE_TK (to any value) to
avoid this hang caused by code in the tkrplot package. You do not have to
have an X server running if R_DONT_USE_TK is set. This will avoid
potential hangs while installing the 23 packages that depend on tkrplot.
tools::pack
tcl:
can't find package tile
error reading package index file
/home/bill/R-devel/R-build/site-library/tcltk2/tklibs/ttktheme_radiance/pkgIndex.tcl:
can't find package tile
...
-Bill
On Thu, Sep 30, 2021 at 9:00 AM Bill Dunlap
wrote:
> I just tried installing forensim on R-devel/Ubuntu
I just tried installing forensim on R-devel/Ubuntu 20.04/WSL-2.0 without an
X server (hence DISPLAY was not set). Loading tktcl gives a warning that
Tk is not available because DISPLAY is not set. The installation hung
after the byte-compile message:
installing to
/home/bill/R-devel/R-build/site-
tools:::prepare2_Rd contains the lines
## FIXME: we no longer make any use of \Rdversion
version <- which(sections == "\\Rdversion")
if (length(version) > 1L)
stopRd(Rd[[version[2L]]], Rdfile,
"Only one \\Rdversion declaration is allowed")
so I am guessing you can
On my Windows 10 laptop I see evidence of the operating system caching
information about recently accessed files. This makes it hard to say how
the speed might be improved. Is there a way to clear this cache?
> system.time(L1 <- size.f.pkg(R.home("library")))
user system elapsed
0.482
le_study_df` must be compatible with existing data.
> ℹ Error occurred for column `third_ventricle_mn`.
> x Can't convert from to due to loss of precision.
> * Locations: 1, 2.
> Backtrace:
> Run `rlang::last_trace()` to see the full context.
>
>
>
>
> --
> Run `rlang::last_error()` to see where the error occurred
What did rlang::last_error() show?
-Bill
On Mon, Sep 6, 2021 at 9:19 AM John Tully
wrote:
> Dear colleagues
> >
> > in conducting a meta-analysis (of MRI data) I am running into the
> repeated issue:
> >
> > Error: Assigned data `si
What is the best way to read (from a text file) timestamps from the fall
time change, where there are two 1:15am's? E.g., here is an extract from a
US Geological Survey web site giving data on the river through our county
on 2020-11-01, when we changed from PDT to PST,
https://nwis.waterdata.usgs.
Is this the kind of thing you are looking for? It separates the scoping
issue from the method dispatch by defining another S3-generic function,
".foo".
> foo <- function(x, ..., data=NULL) with(data, .foo(x, ...))
> .foo <- function(x, ...) UseMethod(".foo")
> .foo.default <- function(x, ...) cat
> z <- tibble(Code=c("NA","NZ",NA), Name=c("Namibia","New Zealand","?"))
> z
# A tibble: 3 x 2
Code Name
1 NANamibia
2 NZNew Zealand
3 ?
> subset(z, Code=="NA")
# A tibble: 1 x 2
Code Name
1 NANamibia
> subset(z, is.na(Code))
# A tibble: 1 x 2
Code Name
1 ?
> su
The packages "officer" and "readxl" both contain functions named
"read_xlsx". It looks like you want the one from readxl so refer to it as
readxl::read_xlsx instead of just read_xlsx.
-Bill
On Thu, Aug 26, 2021 at 12:03 PM Kai Yang via R-help
wrote:
> Hi all,
> I found something, but I don't
unlist(strsplit(vect, "\n"))
On Fri, Aug 6, 2021 at 7:13 AM Luigi Marongiu
wrote:
> Hello,
> I have a vector that contains some elements with concatenated values, such
> as:
> ```
> > vect
> [1] "name_1"
> [2] "name_2"
> [3] "name_3\nsurname_3"
> [4] "some other text\netc"
> ```
> How can I crea
In maximum likelihood problems, even when the individual density values are
fairly far from zero, their product may underflow to zero. Optimizers have
problems when there is a large flat area.
> q <- runif(n=1000, -0.1, +0.1)
> prod(dnorm(q))
[1] 0
> sum(dnorm(q, log=TRUE))
[1] -920
ggplot2::labs() interprets expressions as plotmath. E.g.,
data.frame(X=1:10,Y=(1:10)^2) %>% ggplot(aes(X,Y)) + geom_point() +
labs(x = expression(beta), y = expression(beta^2))
-Bill
On Mon, Jul 19, 2021 at 4:24 PM Rolf Turner wrote:
>
>
> Thanks to Jeff Newmiller, Rui Barradas and
Try
matrix(init_l, nrow=4, ncol=4,
dimnames=list(c("X1","X2","X3","X4"),c("X1","X2","X3","X4")))
It doesn't give exactly what your code does, but your code introduces an
extra level of "list", which you may not want.
-Bill
On Fri, Jul 9, 2021 at 10:40 AM Laurent Rhelp wrote:
> Dear R-Help-li
Does this do what you want?
> df <- data.frame(check.names=FALSE,
lapply(c(Date="date",netIncome="netIncome",`Gross Profit`="grossProfit"),
function(nm)vapply(ISY, "[[", nm, FUN.VALUE=NA_character_)))
> str(df)
'data.frame': 36 obs. of 3 variables:
$ Date: chr "2020-09-30" "2019-09-30
Use backquotes, `X/Y`, to specify a name, not double quotes.
-Bill
On Wed, Jun 23, 2021 at 11:58 AM Mahmood Naderan
wrote:
> Hi
> I have a column in my data file which is "X/Y". With '/' I want to
> emphasize that values are the ratio of X over Y.
> Problem is that in the following command for
Note that !! and !!! are special operators involving "quasiquotation" in
the dplyr package.
I would use as.logical(x) instead of !!x since its meaning is clear to any
user.
-Bill
On Wed, Jun 23, 2021 at 11:13 AM Jeff Newmiller
wrote:
> For the record, `!!` is not an operator so it does not "op
> a variable that equals 1 for the elements I want to select:
>
> t = c(1,1,1,0,0)
How do you typically make such a variable? If you use something like
t <- ifelse(x == "Yes", 1, 0)
you should instead use
t <- x == "Yes"
Naming the variable something like 'isYes' instead of 't' might help
Try using unzip(zipfile, files="desiredFile", exdir=tf<-tempfile()), not
unz(zipfile, "desiredFile"), to copy the desired file from the zip file to
a temporary location and use read_fst(tf) to read the desired file.
-Bill
On Wed, Jun 9, 2021 at 11:27 AM Jeff Reichman
wrote:
> Jan
>
> Makes sens
Martin wrote
Use
num[num %% 2 == 1]
instead of much slower and ...@#^$
num[ifelse(num %% 2 == 1, TRUE, FALSE)]
Read the '[' as 'such that' when the subscript is logical
(=="Boolean"==TRUE/FALSE-values).
[The original post had a typo/thinko, num<-num+i instead of num<-num+1,
which
You didn't say how the values differed. If one in the plot is a rounded
version of the other then adding the ggpur::ggscatter() argument
cor.coeff.args=list(digits=7)
will fix things up.
-Bill
On Sun, May 30, 2021 at 9:18 AM Mahmood Naderan-Tahan <
mahmood.nade...@ugent.be> wrote:
> Hi
>
> M
Also, normalizePath("power.pdf").
On Sun, May 9, 2021 at 5:13 PM Bert Gunter wrote:
> ?getwd
>
> 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 )
>
>
> On Su
Does this happen when you start R with the --vanilla flag? When you remove
or rename ./.RData?
-Bill
On Tue, Apr 20, 2021 at 8:37 PM N. Jordan Jameson
wrote:
> I have a 64-bit Windows machine and I've installed R versions 4.0.0 through
> 4.0.5 and only versions 4.0.2 and below will successfull
R_ext/Utils.h:void R_qsort_int_I(int *iv, int *II, int i, int j);
The last 2 arguments are int, not int*. .C() passes pointers to vectors so
you cannot call this function directly from .C().
-Bill
On Thu, Apr 15, 2021 at 3:15 PM Evangelos Evangelou via R-help <
r-help@r-project.org> wrote:
> H
Terry wrote
I confess to being puzzled WHY the R core has decided on this
definition [of vector] ...
I believe that "R core" followed S's definition of "vector". From the
beginning (at least when I first saw it in 1981) an S vector was the basic
unit of an S object - it had a type and a
help(stat_summary) suggests you use the fun.args=list(...) argument to
pass arguments to the fun.* functions. Try replacing mult=1 by
fun.args=list(mult=1).
It is possible that ggplot2::stat_summary changed its behavior since
that web page was written or that the web page was always wrong.
-Bil
Printing the return value of plot_ly and friends works for me in the
following examples:
# make base plot
p0 <- plotly::plot_ly(na.omit(palmerpenguins::penguins), x =
~bill_length_mm, y = ~body_mass_g)
# now add things to base plot
for(vrbl in list(~species, ~island, ~year)) {
tmp <- plotly::add
That error means that fviz_famd_ind has more than one argument that
starts with 'col' and you must type a more complete name to
disambiguate it. Perhaps col.ind=ifelse(...)?
> args(factoextra::fviz_famd_ind)
function (X, axes = c(1, 2), geom = c("point", "text"),
repel = FALSE, habillage = "n
Snow Section
> Via del Colle Ameno 5
> 60126 Torrette di Ancona, Ancona (AN)
> Uff: +39 071 806 7743
> E-mail: stefano.so...@regione.marche.it
> ---Oo-oO----
>
>
> Da: Bill Dunlap [williamwdun...
Does this happen if you start R with the --vanilla flag? If so it may
be that you have a startup file, .\.Rprofile or %HOME%\.Rprofile that
is calling set.seed(n) for a fixed n.
-Bill
On Mon, Mar 29, 2021 at 12:16 AM Mika Hamari wrote:
>
> Hi!
>
> I have Windows 10 on PC and different versions
no 5
> 60126 Torrette di Ancona, Ancona (AN)
> Uff: +39 071 806 7743
> E-mail: stefano.so...@regione.marche.it
> ---Oo-oO
>
>
> Da: Bill Dunlap [williamwdun...@gmail.com]
> Inviato: venerdì 26 marzo 2021 18.40
> A: Stefano Sofia
> Cc: r-help m
Using rle() may make it easier - finding the peak values is easier and
select from cumsum(lengths) to get the positions of the last values
before the peaks, then add 1. I have not tested the following very
much.
function(x) {
rx <- rle(x)
cumsum(rx$lengths)[c(diff(diff(rx$values)>0) == -1,FAL
Does optim go out of bounds when you specify hessian=FALSE?
hessian=TRUE causes some out-of-bounds evaluations of f.
> optim(c(X=1,Y=1),
> function(XY){print(unname(XY));(XY[["X"]]+1)^4+(XY[["Y"]]-2)^4}, method=
> "L-BFGS-B", lower=c(0.001,0.001), upper=c(1.5,1.5), hessian=TRUE)
[1] 1 1
[1] 1.00
install.packages("hms")
A 'library' is a directory (aka folder) that contains installed
'packages'. I.e., one installs packages into a library, but one does
not install a library.
-Bill
On Wed, Mar 17, 2021 at 10:08 AM Gregory Coats via R-help
wrote:
>
> On my MacBook, I do not have, and do no
The length of the mean vector must match the number of rows and
columns of the sigma matrix. Once you give 3 entries in the mean
vector you will run into the problem that the sigma you are using is
not positive (semi-)definite - a variance must be the product of a
matrix and its transpose.
-Bill
> rutledge_param <- function(p, x, y) ((p$M / (1 + exp(-1*(p$x-p$m)/p$s))) +
> p$B) - y
Did you mean that p$x to be just x? As is, this returns numeric(0)
for the p that nls.lm gives it because p$x is NULL and NULL-aNumber is
numeric().
-Bill
On Sun, Mar 14, 2021 at 9:46 AM Luigi Marongiu wro
1 at 11:28 AM Henrik Bengtsson
wrote:
>
> Test with:
>
> clusterCall(cl, function() { suppressWarnings(source("xx.R")) })
>
> If the warnings disappear, then the warnings are produced on the
> workers from source():ing the file.
>
> /Henrik
>
> On Thu, Mar 4,
> is unlikely, I think there's something in the 'xx.R' script that opens
> a connection but doesn't close it. Possibly multiple times. A good
> check is to see if the same warnings are produced when calling
> source("xx.R") sequentially in a for() loop or an l
To avoid the warnings from gc(), call parallel::stopCluster(cl) before
removing or overwriting cl.
-Bill
On Thu, Mar 4, 2021 at 1:52 AM Shah Alam wrote:
>
> Hello everyone,
>
> I am using the "parallel" R package for parallel computation.
>
> Code:
>
># set number of cores
> cl <- makeCl
1 D53\n60 D62 ",
> :
> more columns than column names
>
> On Mon, Feb 22, 2021 at 5:39 PM Bill Dunlap wrote:
> >
> > Since the columns in the file are separated by a space character, " ",
> > add the read.table argument sep="
Since the columns in the file are separated by a space character, " ",
add the read.table argument sep=" ".
-Bill
On Mon, Feb 22, 2021 at 2:21 PM Val wrote:
>
> Hi all, I am trying to read a messy data but facing difficulty. The
> data has several columns separated by blank space(s). Each co
> but if I give these commands to a local file:
> ```
> fasta.file <- system.file("extdata", "IMGT_data", "templates",
> "stx.fa", package = "openPrimeR")
> fasta.file <- system.file("stx.fa", package = "openPrimeR")
> ```
> where stx.fa il the file I wanted to open and that is pres
Installing a package involves running several R subprocesses, each of
which is running that .Rprofile. You may be able to stop the infinite
recursion by setting an environment variable that subprocesses can
check. E.g. replace
install_github("xxx/yyy")
with
if (Sys.getenv("INSTALLING_FROM_GIT
This will happen if you select no points when it asks you to 'click on
the graph' (to select the level at which to cut the tree). On Windows
you can select no points by right clicking and selecting 'Stop' from
the menu that pops up. RStudio may have a different way to select no
points.
-Bill
On
> could be written as
> >
> > cmd.exe 1>log.txt 2>&1 /C R.exe -f code.R --args "~/file.txt"
> >
> > (but I haven't tested it). You could also use the slightly more
> > efficient
> >
> > cmd.exe 1>log.txt 2>&1 /C Rterm
quot;
[3] "[2] \"--quiet\"
" "[3] \"--vanilla\"
"
[5] "[4] \"-e\"
" "[5] \"commandArgs()\"
"
[7] "[6] \"SPACE/log.txt\"
" "> "
[
1 - 100 of 126 matches
Mail list logo