Displaying 20 results from an estimated 2000 matches similar to: "debug R code"
2012 May 22
3
pad leading zeros in front of strings
Dear All,
This question sounds very simple but I don't know where I am wrong. I just want to pad leading zeros in some string, for example, "123" becomes "00123". What is wrong if I do following?
> sprintf("%05s", "123")
[1] " 123"
It didn't return "00123", instead it padded with 'blank'.
Thank you for your help
2011 Feb 25
7
R in different OS
Hi All,
I have two Rs, one has been installed in Windows system and another one has been installed under UNIX system. Is there any environmental variable or function to tell me which R I am using? The reason that I need to know it is under different system, the data path could be different. I want to do something like
if it is R under Windows
path =
2011 Aug 30
1
locate the needed columns
Hi All,
I have a data frame, whose colnames like "A.x, B.x, C.x, A.y, B.y, C.y". There could be many columns like this pattern. I want to compare data in columns A.x with A.y, B.x with B.y and C.x with C.y etc.
Suppose my data frame is d,
names(d) = c("A.x", "B.x", "C.x", "A.y", "B.y", "C.y");
If I want to
D1 =
2012 Apr 10
1
re-install a package
Hi All,
I have a self-cooked package and save it to a zip file after running make, say named xxx.zip. After installing it to R by running "Install packages from local zip files" under Packages menu in R (Windows), I realized I needed to change some source codes and re-make it. My question is that if I need re-install that package or R would automatically update the R
2011 Mar 10
1
aggregate by part of a field
Hi All,
I have a data frame like
a = data.frame(date = c(20081201, 20081202, 20081201), product = c("a b c d e", "a b c g h t", "d e h a c e h g"), sales = c(1, 2, 3))
Now I want to aggregate the sales by part of the a$product. 'Product' is the product name, a string separated by a space. The key in my aggregate function is
2011 Feb 10
2
Repeaded sampling
Hi all,
I have a dataset. Each time I want to sample N(i) elements from it and I want to repeated sampling M times. N(i) is varied from time to time. For example,
dataset = 1:50;
a = list();
M = 1000;
I want to do something like
for(i in 1:M)
{
a[[i]] = sample(dataset,
2012 Jul 09
1
install.packages
Hi All,
I have two questions regarding install.packages().
Q1: may I run it in non-interactive mode, which means just install the packages I want rather than letting me to choose which mirror etc?
Q2: I ran a R code in batch mode, for example, R CMD BATCH a.r
In a.r, I have some statements like
packages = library()$result[, "Package"];
f(! "plyr" %in% packages)
{
2012 Oct 26
1
backward stepwise model selection
Hi All,
I know in R there is function named 'step', which does the stepwise regression and choose the model by AIC. However, if I want to choose a model per this logic:
1. Run a full model (linear regression, f = lm(y ~., data = ZZZ), for example)
2. Pick up the variable with biggest p value, delete it from the module and get a new regression model.
3. Repeat step 2
2014 Jul 09
3
error com un archivo
Hola a todos,
Me gustaria pedir vuestra ayuda a encontrar el error que no consigo
encontrar en este archivo. He revisado todo mil veces y probado y no doy
con ello.Adjunto el archivo con Google drive porque es muy grande.
?
monicap_50.csv
<https://docs.google.com/file/d/0B8o2KrPEgG7ATlBMc19lTVk1d3M/edit?usp=drive_web>
?
Este es el script, y lo que no entiendo que pasa es que tengo 592044
2014 Jun 04
2
error de incompatible methods
Hola Daniel, si perdona di a responder directamente y no me di cuenta.
Ya se donde esta el error, pero queria preguntar si a puede ser que mi R
funcione mal o algo porque esta manhana ejecute mi script y funciono
perfectamente y ahora volvi a ejecutarlo y me volvio a dar el mismo
problema de ayer , despues de reiniciar y demas el tinnR y el R, no se si
me vacila o es que tengo algo mal en
2007 Nov 15
1
imap process consuming 100% CPU (Dovecot 1.0.3)
>
> Is this behavior cured, or do you continue to see it?
>
No, the behavior isn't cured. We still continue to see it
with various clients. I have posted a couple of truss outputs,
but so far no resolution.
Sorry for the slow response. I've been "fighting other fires".
Jackie
> Jackie Hunt wrote:
> >> On Mon, 2007-09-03 at 12:37 +0200, Robert
2014 Jun 03
3
error de incompatible methods
Hola!!
Estoy intentando ejecutar un script com horas, al principio ejecute estos
comandos
DBx$Date<-strptime(DBx$Date, "%d-%m-%Y") ###Monicap use ; other
use Y
DBx$Year<-as.POSIXlt(DBx$Date)$year+1900
if(filename!="monicap_50.csv") {DBx$Time<-paste(DBx$Time, ":00", sep="")}
Pero me daba el error de que mi base de datos tenia las
2007 Apr 13
2
R on Solaris 10 x64
Hi R Developers,
Greg is helping me with debugging R on Solaris 10 x64. Please let us
know if you have any thoughts or tips that can help us debug this.
Thanks,
David
************
Using default transfer plist
in vector_io: permuting
About to write
*** caught segfault ***
address e8554000, cause 'memory not mapped'
Traceback:
1: .External("do_hdf5save", call,
2002 Feb 01
3
3.0.2p1 under IRIX (coredumps)
Hello,
I am unable to build a working OpenSSH 3.0.2p1 for IRIX 6.5 using either
1. gcc 2.95.3 + binutils 2.11.2
2. SGI MIPSpro cc, CC=cc, LD=/usr/bin/ld, CFLAGS='-mips3 -n32'
Under both setups:
- zlib seems to build fine
- OpenSSL seems to build fine and tests out okay
- OpenSSH builds, and then:
openssh-3.0.2p1 % ./ssh -v myhost
Trace/BPT/RangeErr/DivZero/Ovflow trap (core
2003 Dec 20
1
rsync "hang"
Hello rsync list,
I am running a Solaris 8 system and have rsync 1.6.2 protocal 14 installed.
We have updated (wed 17-dec) to the latest Solaris 8 recommended patch set.
When performing an rsync of two local UFS partitions rsync "hung", never
completed, didn't exit. What I forced an exit via kill signal core dumped.
Config of disks is that 1) Mirror by Solistice Disksuite rsync to
2011 Apr 16
2
doveadm mailbox status 2.0.12 crashes
My gdb won't cooperate and produce a backtrace so I hope this dbx stack
trace gives sufficient clues as to why it crashed. It happended when
I was testing a doveadm command for a user which a large collection
of mboxs:
# dbx doveadm
(dbx) run mailbox status -u user messages \*
... long list ...
igel messages=1
INBOX messages=231
doveadm(user): Panic: Trying to deinit storage
2003 Apr 05
1
Samba 2.2.8 SEGV in rpcclient getdriver on Solaris 7
Hello
I was trying to figure out how to add printer drivers manually for
downloading to Windows 2000 clients and I came accross this problem.
(The printer drivers were installed some time ago using an earlier
version of samba 2.2.x).
$ dbx /usr/local/samba/bin/rpcclient
(dbx) run xxxxxxx -U yyyyyyy
Running: rpcclient xxxxxxx -U yyyyyyy
(process id 4735)
Password:
rpcclient $> enumprinters
2009 Apr 29
2
Timeout leak with dovecot version dovecot1.2(8985:f43bebab3dac)
This is 64bit AIX 5.3. Looking through previous versions of dovecot, I see
this warning. I didn't realize this was something bad until today.
My environment uses mbox/mbox-snarf plugin.
The message in the logs is:
local0.log.20090429:Apr 29 12:41:16 hostname dovecot:
IMAP(jsiegle): Timeout leak: 1100054c0
In dbx(the AIX debugger) I see:
$ dbx imap
Type 'help' for help.
reading
2019 Nov 14
3
Digium's Opus Codec download links broken?
I tried to download Digium’s Opus Codec via the following link, but the server is unavailable: http://downloads.digium.com/pub/telephony/codec_opus/
It took me a while to figure this out, because initially I tried downloading via selecting the Opus codec in make menuselect and realizing that it isn’t there after make install step.
Can someone from Digium/Sangoma please confirm?
FLORIAN
2008 Jan 05
1
imap cores
Experts,
(Now that I am able to run imap...)
Here's what I am seeing with imap, it seems to die in the latest
nightly. (tss, I am still trying to get dbx to work properly, maybe it
won't, but I got some more details here.)
...
2 select "INBOX"
* FLAGS (\Answered \Flagged \Deleted \Seen \Draft)
* OK [PERMANENTFLAGS (\Answered \Flagged \Deleted \Seen \Draft \*)]
Flags permitted.