Displaying 20 results from an estimated 2000 matches similar to: "regular expression in gsub() for strings with leading backslash"
2004 Nov 12
1
dyn.load problem
Hi R-Users
I wrote 1 week ago asking about a message that appears when I try run
dyn.load.
I'm trying to do an example in C code from "Writing R Extension" to
learn how to do it.
I have R 2.0.0, Rtools, Perl and MinGW as describe in
http://www.murdoch-sutherland.com/Rtools/ with path sets.
When I use C:\R\rw2000\bin>RCMD SHLIB -o C:/dev-cpp/teste.dll
2007 Aug 23
1
.Call and to reclaim the memory by allocVector
Hi,
I am not sure if this is a bug and I apologize if it is something I
didn't read carefully in the R extension manual. My initial search on the
R help and R devel list archive didn't find useful information.
I am using .Call (as written in the R extension manual) for the C code
and have found that the .Call didn't release the memory claimed by
allocVector. Even after applying
2007 Aug 23
1
.Call and to reclaim the memory by allocVector
Hi,
I am not sure if this is a bug and I apologize if it is something I
didn't read carefully in the R extension manual. My initial search on the
R help and R devel list archive didn't find useful information.
I am using .Call (as written in the R extension manual) for the C code
and have found that the .Call didn't release the memory claimed by
allocVector. Even after applying
2004 Nov 07
2
Problem with dyn.load()
Hi!
I am studying C language to run with R 2.0.0. My system (Windows ME /BR) is configured to run RCMD ( I have installed ActivePerl, Rtools and MinGW as indicated in http://www.murdoch-sutherland.com/Rtools/ an with correct path).
I would like run the coded write below named conv.c (Example from "Write R Extension") :
#include <R.h>
#include <Rinternals.h>
2017 Mar 13
2
virt-customize fail to inject firstboot script when running it from script.
Hello,
We have a nodejs app which is injecting first boot scripts using virt-customize however the exact same commands are working when triggered manually.
Here is the debug output of the commands
Regards,
Peter
[ 0.0] Examining the guest ...
libguestfs: trace: set_network true
libguestfs: trace: set_network = 0
libguestfs: trace: add_drive
2012 Dec 10
1
Changing arguments inside .Call. Wise to encourage "const" on all arguments?
I'm continuing my work on finding speedups in generalized inverse
calculations in some simulations. It leads me back to .C and .Call,
and some questions I've never been able to answer for myself. It may
be I can push some calculations to LAPACK in or C BLAS, that's why I
realized again I don't understand the call by reference or value
semantics of .Call
Why aren't users of
2012 Jul 23
1
mgcv: Extract random effects from gam model
Hi everyone,
I can't figure out how to extract by-factor random effect adjustments from a
gam model (mgcv package).
Example (from ?gam.vcomp):
library(mgcv)
set.seed(3)
dat <- gamSim(1,n=400,dist="normal",scale=2)
a <- factor(sample(1:10,400,replace=TRUE))
b <- factor(sample(1:7,400,replace=TRUE))
Xa <- model.matrix(~a-1) ## random main effects
Xb <-
2011 Oct 12
1
Error in Rcpp/inline (Windows XP)
Hi, everyone,
I am just trying to use Rcpp in my computer, and I would like to try a
simple example from website, but R keeps reporting me error. I am using
Windows XP, and has installed Rtools and GSI.
Here is the response:
> src = '
+ Rcpp::NumericVector xa(a);
+ Rcpp::NumericVector xb(b);
+ int n_xa = xa.size();
+ int n_xb = xb.size();
+
+ Rcpp::NumericVector xab(n_xa + n_xb - 1);
2015 Apr 14
1
The --inplace is very different from the behaviour of --partial when resuming a complex case transfer.
Hi all,
>From the manpage of rsync, I can see the following descriptions:
--inplace
The option implies --partial (since an interrupted transfer does
not delete the file)
So I do the following testings on the `--inplace' and `--partial' for
resuming a file with the following steps:
1- rsync ftp.cn.debian.org::debian/dists/wheezy/main/binary-amd64/
2013 Feb 23
0
Centos 6.3 and dovecot with an abrt problem
Everyone,
I have a mail server running CentOS release 6.3 (Final) with
2.6.32-279.22.1.el6.i686 kernel that is reporting errors to me
pertaining dovecot. I have appended the error message to this note.
There is only one user that appears to generate this message, and it is
generated to me by way of e-mail without a perceptible problem to the
user which is not me.
This particular user had an
2014 Aug 08
2
[PATCH 1/2] Add type checking, support integers as value
Before this patch, Python would segfault once you pass a non-string key
or value to node_set_value. It was also not possible to set bytes on
Python 3 as Unicode was assumed (Python 2 was not affected by this).
This patch fixes recognition of bytes for Python 3, but in addition it
recognizes ints (includes 'long' in Python 2) for DWORD (LE + BE) and
QWORDs. For this purpose, a new field
2009 Sep 01
2
antispam-plugin 1.2 and trailing carriage-returns
Guys,
Dovecot 1.0.15 [1], just built the latest antispam-plugin 1.2 (tarball)
for testing, mailtrain backend for SA integration. Both built from
custom spec files.
The mail that is being trained is different than its respective source
in the mbox file. The trained one shows added, trailing carriage-return
chars for all headers, which are not in the headers in the mbox file.
This breaks sa-learn
2007 Apr 07
2
Inbox inside the mail location
I recently had some scary experience with the Inbox being stored in the
default /var/mail dir, and I believe it would be a better idea to keep
the Inbox next to any other mail in the users $HOME.
mail_location = mbox:~/.mail:INBOX=~/.mail/INBOX
This is what I used for a quick test, and actually would love to use in
production soon. Based on the test, it just does exactly what I want. :)
2024 Feb 13
2
[PATCH v2 3/8] fbdev: Do not include <linux/backlight.h> in header
Forward declare struct backlight_device and remove the include
statement.
Signed-off-by: Thomas Zimmermann <tzimmermann at suse.de>
Reviewed-by: Jani Nikula <jani.nikula at intel.com>
---
include/linux/fb.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/linux/fb.h b/include/linux/fb.h
index 2ce2f5c2fca9a..7380d959c5d53 100644
--- a/include/linux/fb.h
+++
2012 Mar 07
1
gsub: replacing double backslashes with single backslash
Hello everybody,
this might be a trivial question, but I have been unable to find this using
Google. I am trying to replace double backslashes with single backslashes using
gsub. There seems to be some unexpected behaviour with regards to the
replacement string "\\". The following example uses the string C:\\ which should
be converted to C:\ .
> gsub("\\\\",
2013 May 03
10
Why can't R understand if(num!=NA)?
I have a program, when I write
if(num!=NA)
it yields an error message.
However, if I write
if(is.na(num)==FALSE)
it works.
Why doesn't the first statement work?
Thanks,
Miao
[[alternative HTML version deleted]]
2013 Apr 03
3
Generating a bivariate joint t distribution in R
Hi,
I conduct a panel data estimation and obtain estimators for two of the
coefficients beta1 and beta2. R tells me the mean and covariance of the
distribution of (beta1, beta2). Now I would like to find the distribution
of the quotient beta1/beta2, and one way to do it is to simulate via the
joint distribution (beta1, beta2), where both beta1 and beta2 follow t
distribution.
How could we
2012 Jul 27
2
How can I access an element of a string?
Dear Daniel and Jorge,
Thank you very much and it does help.
If I have a string "ABCD", how can I access the second element of the
string "B"? Thanks,
Miao
2012/7/27 Daniel Nordlund <djnordlund@frontier.com>
> > -----Original Message-----
> > From: r-help-bounces@r-project.org [mailto:r-help-bounces@r-project.org]
> > On Behalf Of jpm miao
2004 Aug 27
3
gsub, backslash and xtable
R Version 1.9.1 (2004-06-21)
Mac OS X.3.5 Dual 2GHz PowerPC G5
GUI = "AQUA"
I have a data.frame comprising percentiles with the column headings
containing % characters, e.g.
> (pp <- colnames(temp2))
[1] "5%" "10%" "25%" "50%" "75%" "90%" "95%"
I use xtable to convert the data.frame to Latex but I want to
2013 Apr 17
3
Transformation of a variable in a dataframe
HI,
I have a dataframe with two variable A, B. I transform the two variable
and name them as C, D and save it in a dataframe dfcd. However, I wonder
why can't I call them by dfcd$C and dfcd$D?
Thanks,
Miao
> A=c(1,2,3)
> B=c(4,6,7)
> dfab<-data.frame(A,B)
> C=dfab["A"]*2
> D=dfab["B"]*3
> dfcd<-data.frame(C,D)
> dfcd
A B
1 2 12
2 4 18