similar to: How to determine a subset of a binary strings?

Displaying 20 results from an estimated 2000 matches similar to: "How to determine a subset of a binary strings?"

2012 Mar 22
2
Strsplit with a separator of ||
Hi, I tried to use strsplit for separating a string with || like strsplit(string,"\\||") but it returned each single character was separated. For example: strsplit("a||bc","\\||") [[1]] [1] "a" "" "" "b" "c" where I want the result to be "a" and "bc". Any ideas? Thanks! Best,
2004 Nov 02
3
n-th power of a matrix
Hello all, To calculate the power of a matrix, I used the command "mtx.exp(X, n)", but there is an error saying "Error: couldn't find function "mtx.exp"". How can I deal with this problem? Jing
2004 Dec 14
4
Several questions in R
Hi, I have several small question in R, 1) How to display all the variables in current workspace? 2) How to write a long command in two lines. Suppose one command line is long to be put within one line. Thanks! tang
2013 Feb 06
2
The interpretation of lm(y~x)?
Hi, I am reading the book "Mixed Effects Models in S and S-Plus" and come across an example with the Rail data. I tried to use lm(travel~Rail,data=Rail) and got the following result: Call: lm(formula = travel ~ Rail, data = Rail) Residuals: Min 1Q Median 3Q Max -6.6667 -1.0000 0.1667 1.0000 6.3333 Coefficients: Estimate Std. Error t value Pr(>|t|)
2024 Jul 11
1
Issues with Ubuntu 22.04 and Installing the Latest Version of R (R 4.4.1) to Docker Image
Yes, keep the $(lsb-release -cs) there. This allows you to change the version of the OS without having to change anything else (for instance we are migrating all of our docker to 24.04 LTS right now, so we only have to modify the FROM entry and all of our Dockerfile will still work). From: Gerber, Lauren J <lauren.gerber at helsinki.fi> Date: Thursday, July 11, 2024 at 2:21?AM To:
2024 Jul 11
1
Issues with Ubuntu 22.04 and Installing the Latest Version of R (R 4.4.1) to Docker Image
Hi Marco, Thank you for the follow up email. In the line below, do I replace $(lsb-release -cs) with jammy (Ubuntu 22.04) or leave it alone: Add-apt-repository ?deb https://cloud.r-project.org/bin/linux/ubuntu jammy-cran40/? It?s good to know about installations for Bioconductor. I am not currently using it, but I may need it in the future for other projects. Br, Lauren -- Lauren J. Gerber
2013 Feb 08
1
Contrasts for a data
Hi, I am using a data called Rail in the nlme package. The data contains two variables: Rail and Travel. >Rail Grouped Data: travel ~ 1 | Rail Rail travel 1 1 55 2 1 53 3 1 54 4 2 26 5 2 37 6 2 32 7 3 78 8 3 91 9 3 85 10 4 92 11 4 100 12 4 96 13 5 49 14 5 51 15 5 50 16 6 80
2014 Jun 12
2
[PATCH v11 06/16] qspinlock: prolong the stay in the pending bit path
On Wed, Jun 11, 2014 at 05:22:28PM -0400, Long, Wai Man wrote: > >>@@ -233,11 +233,25 @@ void queue_spin_lock_slowpath(struct qspinlock *lock, u32 val) > >> */ > >> for (;;) { > >> /* > >>- * If we observe any contention; queue. > >>+ * If we observe that the queue is not empty or both > >>+ * the pending and lock bits
2014 Jun 12
2
[PATCH v11 06/16] qspinlock: prolong the stay in the pending bit path
On Wed, Jun 11, 2014 at 05:22:28PM -0400, Long, Wai Man wrote: > >>@@ -233,11 +233,25 @@ void queue_spin_lock_slowpath(struct qspinlock *lock, u32 val) > >> */ > >> for (;;) { > >> /* > >>- * If we observe any contention; queue. > >>+ * If we observe that the queue is not empty or both > >>+ * the pending and lock bits
2024 Jul 10
1
Issues with Ubuntu 22.04 and Installing the Latest Version of R (R 4.4.1) to Docker Image
Lauren, little oversight from my Dockerfile, if you want to follow the CRAN steps and get the R from the cloud.r-project.org server, you want to replace && add-apt-repository -y "ppa:marutter/rrutter4.0" With && add-apt-repository "deb https://cloud.r-project.org/bin/linux/ubuntu $(lsb_release -cs)-cran40/" The ppa repo is Michael Rutter personal repo
2013 Mar 18
9
how to create a full-virtualization xen VM with autoyast
Hi. I want to create a full-virtualization xen VM with autoyast installation. how can i do that? and how does the configuration file to be configured? I use suse linux 11 SP2. looking forward your replay. Jing. -- View this message in context: http://xen.1045712.n5.nabble.com/how-to-create-a-full-virtualization-xen-VM-with-autoyast-tp5714901.html Sent from the Xen - User mailing
2024 Oct 15
2
R Package: 'ggbreak' in Dockerfile
Hi All, Does anyone have experience successfully installing and loading the R package ?ggbreak? in a Docker container? I ask because I have successfully used the ?ggbreak? package in a script outside the Docker container (on my local computer), but for some reason, I get the following error message when trying to load it using library(ggbreak) or library(?ggbreak?) inside the same script that
2019 Jun 21
4
Calculation of e^{z^2/2} for a normal deviate z
Hello, Well, try it: p <- .Machine$double.eps^seq(0.5, 1, by = 0.05) z <- qnorm(p/2) pnorm(z) # [1] 7.450581e-09 1.228888e-09 2.026908e-10 3.343152e-11 5.514145e-12 # [6] 9.094947e-13 1.500107e-13 2.474254e-14 4.080996e-15 6.731134e-16 #[11] 1.110223e-16 p/2 # [1] 7.450581e-09 1.228888e-09 2.026908e-10 3.343152e-11 5.514145e-12 # [6] 9.094947e-13 1.500107e-13 2.474254e-14 4.080996e-15
2006 Jul 05
4
degrading gracefully - how to tell if JS is enabled?
Is there a RoR best practice wrt determing in a visitor''s browser has JS disabled? Is there even a way to find out? I''ve got a couple of pages in my app that are not going to degrade gracefully at all. I really need to point a visitor who has JS disabled down a seperate path. Any ideas? Thanks, Bill -------------- next part -------------- An HTML attachment was scrubbed...
2019 Jun 21
4
Calculation of e^{z^2/2} for a normal deviate z
You may want to look into using the log option to qnorm e.g., in round figures: > log(1e-300) [1] -690.7755 > qnorm(-691, log=TRUE) [1] -37.05315 > exp(37^2/2) [1] 1.881797e+297 > exp(-37^2/2) [1] 5.314068e-298 Notice that floating point representation cuts out at 1e+/-308 or so. If you want to go outside that range, you may need explicit manipulation of the log values. qnorm()
2006 Mar 16
4
problem for wtd.quantile()
Dear R-users, I don't know if there is a problem in wtd.quantile (from library "Hmisc"): -------------------------------- x <- c(1,2,3,4,5) w <- c(0.5,0.4,0.3,0.2,0.1) wtd.quantile(x,weights=w) ------------------------------- The output is: 0% 25% 50% 75% 100% 3.00 3.25 3.50 3.75 4.00 The version of R I am using is: 2.1.0 Best,Jing
2006 Jun 20
1
Determine the data type of a function to an argument
Hello All: How can I determing the "types" of args passed to an R function? For example, given the following: calculate <- function(...) { args <- list(...) argName = names(args) if (arg1 == character) cat("arg1 is a character") else cat("arg1 is numeric") if (arg2 == character)
2024 Oct 15
2
R Package: 'ggbreak' in Dockerfile
Don't you have to load BiocManager before using it? -----Original Message----- From: R-SIG-Debian <r-sig-debian-bounces at r-project.org> On Behalf Of Gerber, Lauren J Sent: Tuesday, October 15, 2024 9:15 AM To: r-sig-debian at r-project.org Cc: dirk at eddelbuettel.com Subject: Re: [R-sig-Debian] R Package: 'ggbreak' in Dockerfile Hi All, Does anyone have experience
2008 Jun 11
4
Matrix transformation problem
ng, I have a matrix (x) with binary content. Each row of the matrix holds exactly one 1, and the rest of the row is zeros. The thing is that I need to 'collapse' the matrix to one column where each row holds the original column index of the 1's (y). Sometimes, the matrix is quite large, so I have a perfomance problem. x <- matrix(c(1,0,0, 0,0,1, 0,1,0, 0,0,1, 0,1,0,
2008 Feb 07
5
pnorm
Dear R list, I calculated a two-sided p values according to 2*(1-pnorm(8.104474)), which gives 4.440892e-16. However, it appears to be 5.30E-16 by a colleague and 5.2974E-16 from SAS. I tried to get around with mvtnorm package but it turns out to be using pnorm for univariate case. I should have missed some earlier discussions, but for the moment is there any short answer for a higher