Rolf,
looking at the configure script I believe you need to specify
--with-tcl-config=/usr/lib/tcl8.6/tclConfig.sh
and similarly
--with-tk-config=
HTH,
Peter
On Fri, Nov 17, 2017 at 8:43 PM, Rolf Turner wrote:
> On 18/11/17 17:00, Erin Hodgess wrote:
>>
>> When I have compiled from sourced
Your data frame fam contains factors. Turn it into character strings using
fam$Family = as.character(fam$Family)
and try again. It may be helpful if you read up on R's factors, see ?factor.
HTH,
Peter
On Tue, Nov 21, 2017 at 2:14 PM, Glen Forister wrote:
> This is a simple problem, but a myst
I would go to the source, in this case Dirk Eddelbuettel's (I hope I
spelled it correctly) documentation for Rcpp:
http://dirk.eddelbuettel.com/code/rcpp/Rcpp-attributes.pdf
Note that you need to do
sourceCpp("logistic_map.cpp")
in R instead of building and dyn.load()-ing the object.
HTH,
Pet
Your code generates an error that has nothing to do with dopar. I have
no idea what your function stack is supposed to do; you may be
inadvertently calling utils::stack which would produce this kind of
error:
> stack(1:25, RAT = FALSE)
Error in data.frame(values = unlist(unname(x)), ind, stringsAs
Hi all,
a user contacted me about a segfault when installing WGCNA package
dowloaded from CRAN. I also see a segfault like that on certain
installs of R.
The package passes all CRAN checks, so presumably this has something
to do with the R installation or environment. The R versions here are
not
I got some spam emails after my last post to the list, and the emails
did not seem to go through r-help. The spammers may be subscribed to
the r-help, or they get the poster emails from some of the web copies
of this list (nabble or similar).
Peter
On Tue, Apr 17, 2018 at 11:37 AM, Ulrik Stervbo
I would use "the number of degrees of freedom is defined... ".
Peter
On Sun, Jun 24, 2018 at 2:46 PM Rolf Turner wrote:
>
>
> Does/should one say "the degrees of freedom is defined to be" or "the
> degrees of freedom are defined to be"?
>
> Although value of "degrees of freedom" is a single numbe
This is a bit of a shot in the dark since I haven't used randomForest
in several years, but I seem to recall that running randomForest
through the formula interface was asking for trouble... Try not using
the formula interface and specify the x, y, xtest arguments directly.
Peter
On Fri, May 26,
First, please read WGCNA FAQ at
https://labs.genetics.ucla.edu/horvath/CoexpressionNetwork/Rpackages/WGCNA/faq.html
regarding using RNA-seq and other count data.
Second, if you insist on using WGCNA on raw count data (which I don't
recommend), use something like
storage.mode(datExpr) = "double"
I think you want rank, not order.
> x <- c(19,17,23,11)
> order(x)
[1] 4 2 1 3
> rank(x)
[1] 3 2 4 1
See help(order) and help(rank) for the difference.
Peter
On Mon, Jul 17, 2017 at 7:58 PM, Jesadaporn Pupantragul
wrote:
> Hello r-help
> I am learning R and use R-studio.
> I create vector x <-
I would try something like
n = 5
a <- rnorm(n,0.8,0.1)
so <- rnorm(n,0.5,0.1)
m <- rnorm(n,1.2,0.1)
mats = mapply(function(sa1, so1, m1) matrix(c(0,sa1*m1,so1,sa1),2,2,byrow=T),
a, so, m, SIMPLIFY = FALSE)
> mats
[[1]]
[,1] [,2]
[1,] 0.000 0.9129962
[2,]
On Fri, Sep 29, 2017 at 2:32 PM, peter dalgaard wrote:
>
>> On 29 Sep 2017, at 22:43 , MacQueen, Don wrote:
>>
>> I used to use SAS a lot, but I don't know what the line
>> *Yield Champagin;
>> does.
>
> Nothing. It's a comment...
Fortune nomination!
Peter
On Mon, Oct 2, 2017 at 7:47 AM, Federico Calboli
wrote:
>
> Thus my question: when can I consider a library to be properly published and
> really publicly available? CRAN and BioConductor are clearly gold standards.
> What about Github? I am currently using the rule ‘not on CRAN == outright
I use my own functions multiGrep and multiGrepl:
multiGrep = function(patterns, x, ..., sort = TRUE, invert = FALSE)
{
if (invert)
{
out = multiIntersect(lapply(patterns, grep, x, ..., invert = TRUE))
} else
out = unique(unlist(lapply(patterns, grep, x, ..., invert = FALSE)));
if (
Two solutions...
v + matrix(b, nrow(v), ncol(v), byrow = TRUE)
or
t(apply(v, 1, `+`, b))
Peter
On Sun, May 22, 2016 at 10:39 PM, Steven Yen wrote:
> Hi all, need help below. Thank you.
>
> > # Matrix v is 5 x 3
> > # Vector b is of length 3
> > # I like to add b[1] to all element in v[,1]
Forgot to cc the list...
-- Forwarded message --
From: Peter Langfelder
Date: Sat, Jul 9, 2016 at 1:32 PM
Subject: Re: [R] How to make the "apply" faster
To: Debasish Pai Mazumder
You could try the following (I haven't tested it so check that the
res
If you have a simple list of vectors (call it lst), use
lengths = sapply(lst, length)
In general, you may want to look at functions lapply and sapply which
apply a function over a list, in this case the function length().
Peter
On Wed, Jul 27, 2016 at 8:20 AM, Stefan Kruger wrote:
> Hi -
>
> I
Last time I looked (admittedly a few years back), on unix-alikes
(which you seem to be using, based on your use of top),
foreach/doParallel used forking. This means each worker gets a copy of
the entire R session, __but__ modern operating systems do not actually
copy on spawn, they only copy on wri
Do not set the upper (or lower) triangle to NA. Simply supply the full
matrix to pheatmap. I am not an expert on pheatmap but looking at the
manual you should supply clustering_distance_rows = "none",
clustering_distance_cols = "none" or something like that to make
pheatmap interpret the matrix as
On Sat, Sep 17, 2016 at 2:12 PM, David Winsemius wrote:
>
>
> Not entirely clear. If you were intending to just get character output then
> you could just use:
>
> strsplit(txt, ";")
>
> If you wanted parsing to an R expression to occur you could pass through
> sapply and get a full accounting o
You have multiple options. I will advertise my own solution - install
the package WGCNA, installation instructions at
http://labs.genetics.ucla.edu/horvath/CoexpressionNetwork/Rpackages/WGCNA/#cranInstall
then you can use the function
cp = corAndPvalue(t(genes), t(features)).
You need to transpo
There are two issues here. First, your original factor seems to have 4
levels: " F", " M", "F", "M". Note the extra space in front of the
first two F and M. You may want to fix that first:
gender.fixed = sub(" ", "", as.character(data$gender))
Check that everything is correct by typing
table(gen
Hi Terry,
maybe I'm missing something, but why not define a matrix BB = V'B;
then t(B) %*% V = t(BB), then your problem reduces to finding A such
that t(BB) %*% A = 0?
Peter
On Thu, Jul 16, 2015 at 10:28 AM, Therneau, Terry M., Ph.D.
wrote:
> This is as much a mathematics as an R question, in t
R does not need a semicolon or other character to terminate a command;
if a line can be interpreted as a complete command, it will (first
line in your second example).
Also note that the first example may not produce what you want (if
your second example is any indication) - the result of
pbivnorm
Try removing the line
x <- x[order(x[,1], decreasing=TRUE),]
Peter
On Tue, Aug 4, 2015 at 10:58 AM, April Smith wrote:
> Let me just preface that everything I know about writing code for R is self
> taught so this may be really basic but I can't figure it out!
>
> I am using someone else code
You can create a suitable matrix bb as below (note the byrow = TRUE argument)
aa<-matrix(1:30,nrow=10,ncol=3); aa
bb<-matrix(c(100,100,1),nrow=10,ncol=3, byrow = TRUE); bb
dim(aa)
dim(bb)
aa * bb
You can also use matrix multiplication, but that;s slightly more involved:
aa<-matrix(1:30,nrow=10,
On Wed, Jan 7, 2015 at 3:15 PM, Peter Langfelder
wrote:
> You can create a suitable matrix bb as below (note the byrow = TRUE argument)
>
> aa<-matrix(1:30,nrow=10,ncol=3); aa
> bb<-matrix(c(100,100,1),nrow=10,ncol=3, byrow = TRUE); bb
> dim(aa)
> dim(bb)
> aa * bb
&g
If you have a symmetric matrix, you can work with the upper triangle
instead of the lower one, and you get what you want by simply using
as.vector(A[upper.tri(A)])
Example:
> a = matrix(rnorm(16), 4, 4)
> A = a + t(a)
> A
[,1] [,2] [,3][,4]
[1,] 0.3341294 0.5460334
It's hard to say from your description what the situation is. The error
simply means the plot area is too small for the figure margins to fit. Try
closing the graphics (plot) window before you run the section that causes
the error, or you can try maximizing the plotting window.
You can also contact
On Fri, Feb 20, 2015 at 6:56 PM, Rolf Turner wrote:
> On 21/02/15 15:02, Jeff Newmiller wrote:
>>
>> R CMD INSTALL --build packagename
>
>
> That will create a *.tar.gz file, not a *.zip file. The latter being
> what Erin wanted, if I understand correctly.
It depends on her system (I don't see
Looking at ?rm, my solution would be something like
rm(list = grep("\\.NS$", ls(), value = TRUE))
But test it since I have not tested it.
Peter
On Fri, Jul 27, 2018 at 10:58 PM akshay kulkarni wrote:
>
> dear memebers,
>I am using R in AWS linux instance for my
If I understand it correctly, the function getSymbols creates a
variable with the name being the stock symbol. Then use the function
get(symbol) to retrieve the value of the variable whose name is
contained in the character string `symbol'. Assign that to a variable
(e.g. AVB). You may also have to
:
> AVB[["AVB.Close"]]
> and I got:
> Error in AVB[["AVB.Close"]] : subscript out of bounds
> Are you assuming that AVB is a data frame? I do not think AVB is a data
> frame. Is there a way
> for me to check?
> Thanks,
> Bob
>
> On 8/
Segfaults are not always repeatable. You may have an undefined pointer that
sometime points into unreachable or unallocated memory, causing a segfault,
and sometimes may point into valid memory, without causing a segfault.
You may want to read
https://cran.r-project.org/doc/manuals/r-release/R-ext
On Mon, Aug 13, 2018 at 12:18 PM Ista Zahn wrote:
>
> On Mon, Aug 13, 2018 at 2:41 PM Ravi Varadhan wrote:
> >
> > Hi Ista,
> > Thank you for the response. I use Windows. Is there a pre-compiled
> > version of openBLAS for windows that would make it easy for me to use it?
>
> Not sure. If you
AFAIK a try or tryCatch will intercept the error thrown by stop(). Why
not try it and see if it works?
Peter
On Thu, Aug 16, 2018 at 1:05 PM Roy Mendelssohn - NOAA Federal via
R-help wrote:
>
> Hi All:
>
> I am using another package in a project I have. Because of that, I have no
> control on h
My guess is that space has no effect because (1) the first element is
zero and (2) the code in OP's message has
barplot(gceac[,3], ...
i.e. barplot does not see a matrix, only a vector.
To the OP, try formatting the data to be plotted as a matrix, not as a
vector, then the space argument should b
On Sun, Aug 19, 2018 at 7:15 AM wrote:
>
> August 19, 2018 4:58 AM, "Peter Langfelder"
> wrote:
>
> > To the OP, try formatting the data to be plotted as a matrix, not as a
> > vector
>
> CSV data provided in a previous message; is not the data formatt
On Thu, Aug 23, 2018 at 7:33 AM Berwin A Turlach
wrote:
>
> G'day Rolf,
>
> On Thu, 23 Aug 2018 23:34:38 +1200
> Rolf Turner wrote:
>
> > I guess I should have said --- I did
> >
> > sudo make prefix=/usr install
> >
> > which puts stuff into /usr rather than into /usr/local.
>
> ???
>
> I d
A simpler short term solution is to execute dev.off() and look for the plot
in file Rplots.pdf in the current directory. Depending on the OS of the
local computer, you should be able to point a file browser at the EC
instance and simply click the file to open in in a pdf viewer on the local
machine
Remove the / from the print command, it does not belong there.
sink("../directory/file.txt");
print(summary(foo))
sink(NULL)
On Thu, Sep 13, 2018 at 4:03 PM Rich Shepard
wrote:
> On Thu, 13 Sep 2018, Rich Shepard wrote:
>
> > sink('example-output.txt')
> > print(summary(df))
> > sink()
>
>
For the second time: Rich, there should be no slash in the print() command.
Use the form
sink("../directory/file")
print(summary(foo)) ### no slashes here
sink(NULL)
Peter
On Thu, Sep 13, 2018 at 7:12 PM Rich Shepard
wrote:
> On Thu, 13 Sep 2018, Henrik Bengtsson wrote:
>
> >> sink('stat-summ
There is no path in print. The path (file) is set in sink().
Peter
On Thu, Sep 13, 2018 at 4:35 PM Rich Shepard
wrote:
> On Thu, 13 Sep 2018, Peter Langfelder wrote:
>
> > Remove the / from the print command, it does not belong there.
>
> Peter,
>
>So the print()
sink().
Technically, print() sends output to a device called "standard output"
which is usually screen, but it can be changed to a file (_any_ writable
file) using the sink() command.
Hope this helps,
Peter
On Thu, Sep 13, 2018 at 4:35 PM Rich Shepard
wrote:
> On Thu, 13 Sep 2018, Pete
I don't know tibble, so I'll do the same with a plain data frame:
a =
data.frame(x=LETTERS[1:4],y=1:4,z=rnorm(4),a=c("dog","cat","tree","ferret"))
> a
x y z a
1 A 1 -0.08264865dog
2 B 2 0.32344426cat
3 C 3 -0.80416061 tree
4 D 4 1.27052529 ferret
> mean(a[2:3])
[1] NA
I would try something like
x = get(myvarname)
attr(x, "foo") = "bar"
assign(varname, x)
HTH,
Peter
On Wed, Oct 10, 2018 at 9:15 PM Marc Girondot via R-help <
r-help@r-project.org> wrote:
> Hello everybody,
>
> Has someone the solution to set attribute when variable is known by name ?
>
> Thank
oops, I think the right code would be
x = get(varname)
attr(x, "foo") = "bar"
assign(varname, x)
On Wed, Oct 10, 2018 at 9:30 PM Peter Langfelder
wrote:
> I would try something like
>
> x = get(myvarname)
> attr(x, "foo") = "bar"
> assign(
The coefficients are best obtained as summary(Model)$coefficients.
This is a matrix can than be saved as a csv file and opened in excel
or other spreadsheet software.
HTH,
Peter
On Tue, Oct 16, 2018 at 9:44 AM Neslin, Scott A.
wrote:
>
> R-Help:
>
> We are working with your GLM R package. The S
You should be more specific about what you want to replace and with
what. The pattern you use, namely "[0-9][0-9]/[0-9[0-9].*com", does
not (AFAICS) match any of the strings in your data, so don't be
surprised that your commands do not change anything.
If you have a correct pattern and replacement
It should be said that for many basic statistics, there are faster
functions than apply, for example here you want
sum = colSums(x)
As already said, for sum of squares you would do colSums(x^2).
Many useful functions of this kind are implemented in package
matrixStats. Once you install it, eithe
See inline.
On Sat, Jan 12, 2019 at 9:56 AM Witold E Wolski wrote:
> ypred_oob <- predict(diachp.rf)
AFAIK these are, indeed, the out-of-bag predictions.
> dataX <- data %>% select(-quality) # remove response.
> ypred <- predict( diachp.rf, dataX )
These are not out of bag predictions. dataX
The lazy way is to do
tst_tab = tst_tab[c(2,1), c(2,1)]
The less lazy way is something like
tst_tab <- table(predicted = factor(tst_pred, levels = c("Yes",
"No")), actual = factor(default_tst$default, levels = c("Yes",
"No")))
Peter
On Wed, Jan 16, 2019 at 4:39 PM wrote:
>
> R-Help
>
>
>
> R
If you want to remove just the hyphen, why not do
sub("-", "", tb2a$TID)
sub("-", "", "73-017323")
[1] "73017323"
Am I missing something?
Peter
On Fri, Mar 15, 2019 at 12:46 PM Bill Poling wrote:
>
> Good afternoon.
>
> sessionInfo()
> #R version 3.5.3 (2019-03-11)
> #Platform: x86_64-w64-min
Sorry for being late to the party, but has anyone suggested a minor
but important modification of the code from stack exchange?
xyplot(mpg ~ wt | cyl,
panel = function(x, y, ..., groups, subscripts) {
pch <- mypch[factor(carb)[subscripts]]
col <- mycol[factor(
]
> <https://mailtrack.io?utm_source=gmail&utm_medium=signature&utm_campaign=signaturevirality5&;>
> Sender
> notified by
> Mailtrack
> <https://mailtrack.io?utm_source=gmail&utm_medium=signature&utm_campaign=signaturevirality5&;>
> 04/09/19,
&g
Have you tried read.csv.sql from package sqldf?
Peter
On Tue, Aug 5, 2014 at 10:20 AM, Spencer Graves
wrote:
> What tools do you like for working with tab delimited text files up to
> 1.5 GB (under Windows 7 with 8 GB RAM)?
>
>
> Standard tools for smaller data sometimes grab all the
On Wed, Aug 13, 2014 at 11:57 PM, Peter Brady
wrote:
> Hi All,
>
> I've inherited some R code that I can't work out what they've done. It
> appears to work and give sort of reasonable answers, I'm just trying to
> work out why they've done what they have. I suspect that this is a
> simple vector
Hi all,
I have recently started working with Date objects and find the
experience unsettling, to put it mildly.
The help for as.Date says, in part:
## S3 method for class 'character'
as.Date(x, format = "", ...)
x: An object to be converted.
format: A character string. If n
here
the argument format="" is given. G...
Peter
On Wed, Aug 20, 2014 at 11:56 AM, Peter Langfelder
wrote:
> Hi all,
>
> I have recently started working with Date objects and find the
> experience unsettling, to put it mildly.
>
> The help for as.Date says, in part:
&g
On Wed, Oct 1, 2014 at 3:11 PM, Kate Ignatius wrote:
> Is there an easy way to check whether a variable is within +/- 10%
> range of another variable in R?
Yes,
checkRange = function(A, B, range = 0.1)
{
A>=B*(1-range) & A<=B*(1+range);
}
Test:
A = c(67, 24, 40, 10, 70, 101, 9)
B = c(76, 23
You are getting a p-value, namely p=0. It's just that, when taken
literally, the p-values are wrong.
I'm not familiar with predictABEL, but my guess is that the p-value is
below 2e-16 or some such cutoff and gets printed as zero (the means
seem to be about 10 standard deviations away from zero, wh
see help(load) and pay particular attention to what the function
returns: the names of the loaded objects, not the object(s)
themselves.
You have to use
predict(fit,Testsamp,type="response")
since the load() created a variable 'fit' (same name as the one saved).
HTH
Peter
On Mon, Oct 13, 20
>From an older post by Uwe Ligges:
Anyway: R tried to download the package but got an html page, obviously,
hence either the mirror you are using is corrupted or someone in between
(like some proxy?) delivers html pages rather than packages...
In other words, check your proxy/internet settings,
On Thu, Aug 20, 2015 at 10:04 PM, Bert Gunter wrote:
>> I noticed you made two data-frames, ‘my4s' and ‘my4S'. The `my4S` was built
>> with `cbind` which would create a matrix (probably a character matrix)
>> rather than a data frame.
>
> False. There is a data.frame method for cbind that retur
lifford Stoll
>
>
> On Thu, Aug 20, 2015 at 10:47 PM, Peter Langfelder
> wrote:
>> On Thu, Aug 20, 2015 at 10:04 PM, Bert Gunter wrote:
>>
>>>> I noticed you made two data-frames, ‘my4s' and ‘my4S'. The `my4S` was
>>>> built with `cbi
Not sure if this is slicker or easier to follow than your solution,
but it is shorter :)
do.call(c, lapply(n:1, function(n1) 1:n1))
Peter
On Thu, Sep 17, 2015 at 11:19 AM, Dan D wrote:
> Can anyone think of a slick way to create an array that looks like c(1:n,
> 1:(n-1), 1:(n-2), ... , 1)?
>
>
Hi Giovanni,
please follow Tutorial I, section 3 (particularly 3d, "Summary output
of network analysis results") at
http://labs.genetics.ucla.edu/horvath/CoexpressionNetwork/Rpackages/WGCNA/Tutorials/index.html
. This will show you how to output module membership of each CpG into
a file. If you wa
You want to use qf which gives you the value at a given percentile. pf
gives you the p-value for a given value of F (inverse)
> qf(0.95, 1, 1)
[1] 161.4476
> pf(161.4476, 1, 1)
[1] 0.95
Peter
On Mon, Dec 21, 2015 at 11:51 AM, Robert Sherry wrote:
>
> When I use a table, from a Schaum book, I
My guess is that a mapply would take forever to run. I would split it
up into smaller blocks - not too large so the calculation can fit into
the RAM, and not too small to make the calculation tun too long. Say
500 columns per block, that way each correlation matrix takes up
500*500*8 bytes = 1.9 MB
I'm not really an expert, but here are my 2 cents:
To the best of my limited knowlede, there is no direct way of ensuring
that the total memory being requested by N workers remains below a
certain threshold. You can control the number of child processes
forked by foreach/doPar in the registerDoPar
I am not overly familar with Mint, but you need the "development
version" of the readline library. If you have a GUI package manager
installed, open it and search for readline. You should see a version
that ends with -dev or -devel; you need to install that.
HTH,
Peter
On Mon, Feb 1, 2016 at 3:0
Use lapply or sapply. A data frame is also a list with each component
representing one column; lapply/sapply will apply the function to each
column.
Peter
On Thu, Apr 7, 2016 at 1:25 PM, John Sorkin wrote:
>
> I would like to apply a function, fract, to the columns of a
> dataframe. I tried th
I came up with this, using recursion. Short and should work for n
greater than 9 :)
Peter
sumsToN = function(n)
{
if (n==1) return(1);
out = lapply(1:(n-1), function(i) {
s1 = sumsToN(n-i);
lapply(s1, c, i)
})
c(n, unlist(out, recursive = FALSE));
}
> sumsToN(4)
[[1]]
[1] 4
[[2]
Add a
simplify = FALSE
to the call to replicate, and you'll get a list.
replicate(5, matrix(rnorm(4), 2, 2), simplify = FALSE)
Peter
On Wed, Nov 9, 2016 at 10:45 AM, Rui Barradas wrote:
> Hello,
>
> I also thought of replicate() but it creates an 2x2x5 array, not a list.
> Maybe it's all the
It's not clear whether your numbers are tab or space-separated, I will
assume space-separated. My lowtech (and not R) solution would be to
dump the output into a text file (call it data.in), then run a sed
command to first replace two initial spaces from each line, then
replace initial spaces with
I can see the file under this link:
http://www.floppybunny.org/robin/web/rbook/online_chapters/r_and_the_raspberry_pi.pdf
Make sure the (English) words are not split - my first attempt
contained raspber_ry and thus it failed.
Peter
On Mon, Jan 2, 2017 at 5:10 PM, John Sorkin wrote:
> Robin,
>
Just to set the record straight, WGCNA is a CRAN package.
As to Ankush's question - the current WGCNA version does not support
analysis of more than about 46300 nodes (probes) in one block. You
have two options: 1. filter out some of the least-informative probes
(e.g., probes with lowest mean expr
On Sat, Mar 11, 2017 at 2:11 PM, Mohammad Tanvir Ahamed via R-help
wrote:
> Thanks for reply.
> as I said , the function in the package is like
> myplot <- function(x,y) { plot(x,y) }
>
> not like
> myplot <- function(x,y) { plot(x,y,...) }
>
> And I cant change the function inside the package!!
I don't use pvclust but from a cursory reading and from the error
indicating bootstrap I am guessing that pvclust carries out some sort of a
sampling of the features on which you cluster. Since you only retain two
features (coordinates), the sampling necessarily results in just one
feature being re
This would certainly simplify and make more readable some of my code where
I create multiple versions of the same plot calling the same function with
minor variations of a few of many arguments. Thanks!
Peter
On Fri, Jan 1, 2021 at 12:20 PM Bert Gunter wrote:
> Hi all:
>
> In the course of play
I thinnk the answer is much simpler. The print method for hypothesis
tests (class htest) truncates the p-values. In the above example,
instead of using
wilcox.test(rnorm(100), rnorm(100, 2), exact=TRUE)
and copying the output, just print the p-value:
tst = wilcox.test(rnorm(100), rnorm(100, 2),
I think the only thing you are doing wrong is not setting the random
seed (set.seed()) so your results are not reproducible. Depending on
the random sample used to select the training and test sets, you get
slightly varying accuracy for both, sometimes one is better and
sometimes the other.
HTH,
I'm not sure I understand the task, but if I do, assuming your data
frame is assigned to a variable named df, I would do something like
sumNs = function(x, n)
{
if (length(x) %%n !=0) stop("Length of 'x' must be a multiple of 'n'.")
n1 = length(x)/n
ind = rep(1:n1, each = n)
tapply(x,
Thanks!
Peter
On Tue, Apr 5, 2022 at 6:01 PM Jeff Newmiller wrote:
>
> ?codetools::findGlobals
>
> On April 5, 2022 5:36:54 PM PDT, Peter Langfelder
> wrote:
> >Hi all,
> >
> >I'd like to check a function for undeclared global variables using
> >som
;
> > x <- 1:10
> > x[ rep(NA_integer_, 3) ]
> [1] NA NA NA
> > x[ rep(NA, 3) ]
> [1] NA NA NA NA NA NA NA NA NA NA
>
> -Bill
>
>
> On Fri, Jul 1, 2022 at 8:31 PM Peter Langfelder
> wrote:
>>
>> Hi all,
>>
>> I stumbled on subs
Hi all,
I'm either confused about dev.prev() or there's a bug in it. Open two
devices, plot a plot, call dev.prev() and plot again. I would expect
the second plot to appear in the first device, but that is not what
happens; both plots appear in the second device. Is this expected
behavior or a bug
Ah, thanks, got it. Misread the help again...
Peter
On Mon, Dec 5, 2022 at 9:38 PM Ivan Krylov wrote:
>
> В Mon, 5 Dec 2022 21:28:16 +0800
> Peter Langfelder пишет:
>
> > Open two devices, plot a plot, call dev.prev() and plot again. I
> > would expect the second plo
It's a microarray data set, so I don't think you would want to apply
an RNA-seq pipeline. You'd be better off applying a normalization
appropriate for this type of microarray data.
HTH,
Peter
On Sun, Apr 2, 2023 at 11:09 PM Anas Jamshed wrote:
>
> I want to get the count matrix of genes from
>
Sarah, if you haven't done so already, please do us (OpenBLAS users) a
big favor and report the bug, either to Fedora or directly to OpenBLAS
maintainers.
Peter
On Thu, Jul 18, 2019 at 11:46 AM Sarah Goslee wrote:
>
> Wow. You are entirely correct. I would not have been able to pinpoint
> the pr
I would remove the quotes using sub, something like
# Read the file as text lines
text = readLines(con = file(yourFileName))
# Remove the offending quotes
text = gsub("'|\"", "", text)
# Concatenate and turn into a data frame
concat = paste(text, collapse = "\n")
df = read.table(text = concat, ...
If the data are numeric (or at least some columns are numeric), a
brute force solution is to read a file once with header = FALSE, check
the relevant column(s) for being numeric, and if they are not numeric,
re-read with header = TRUE. Alternatively, if you know the column
names (headers) beforehan
I suspect that you want to identify which variables are highly
correlated, and then keep only "representative" variables, i.e.,
remove redundant ones. This is a bit of a risky procedure but I have
done such things before as well sometimes to simplify large sets of
highly related variables. If your
; to keep one of those highly correlated ones.
>
> I tried to do your code:
> > tree = hclust(1-calc.rho, method = "average")
> Error in if (is.na(n) || n > 65536L) stop("size cannot be NA nor
> exceed 65536") :
> missing value where TRUE/FALSE needed
Try
for (ind in 1:24)
{
data = read.csv(paste0("data", ind, ".csv"))
...
}
Peter
On Mon, Feb 19, 2024 at 11:33 AM Steven Yen wrote:
>
> I need to read csv files repeatedly, named data1.csv, data2.csv,… data24.csv,
> 24 altogether. That is,
>
> data<-read.csv(“data1.csv”)
> …
> data<-rea
Your code does not work because Tag is not numeric. You need to exclude Tag
from the data frame df and instead assign it as rownames. Also, dist
requires a numeric matrix, not data frame.
df = as.matrix(data.frame(Healthy, Tumour, Metastasis))
or
df = cbind(Healthy, Tumour, Metastasis)
rownames(d
The time has changed from "standard" (EST) to "Daylight saving" (EDT) which
shaves off 1 hour.
Peter
On Sun, Mar 29, 2020 at 5:03 PM Sebastien Bihorel via R-help <
r-help@r-project.org> wrote:
> Hi,
>
> Why is there less number of seconds on 03/10/2019 in the internal POSIX
> system? The differe
You need 1:(m-1) in your function. The operator : has precedence over -:
> 1:3-1
[1] 0 1 2
> 1:(3-1)
[1] 1 2
Happened to me a few times as well before I remembered.
HTH,
Peter
On Fri, Apr 17, 2020 at 3:50 PM Monica Palaseanu-Lovejoy
wrote:
>
> Hi,
>
> I wrote a relatively simple function. If
The big question is whether each worker or thread uses parallel
processing itself, or whether it uses resources like cache in which
case 20 threads fighting over the cache would slow you down
substantially. If your simulations use operations implemented in BLAS
or LAPACK, be aware that some R insta
You have several options. You can use theF18 package manager to
install R directly from a Fedora software repository but the R may be
slightly out of date (IIRC Fedora 19 provides R-3.0.0; not sure about
F18).
Or, on your CRAN mirror page, ignore the "Download and install R"
section and go straig
[cc-ing the list]
On Wed, Jul 10, 2013 at 11:36 PM, Christofer Bogaso
wrote:
> Hello again,
>
> I was wondering if it is possible to install OpenBLAS linear algebra
> library in R running under windows.
You will have to re-compile R from source and re-install it.
http://cran.r-project.org/doc/m
1 - 100 of 413 matches
Mail list logo