Displaying 20 results from an estimated 30000 matches similar to: "confused by switch() and the letter E"
2013 Apr 05
1
mixed formatting of integer and numeric (e. g., by summary.default())
Hello, eveRybody,
I've been trying to find the origin for the following
formatting-"inconsistency":
E. g., look at the number of digits in summary.defaults()'s output when
NAs occur: in my example below the number of NA's is displayed as an
integer, the rest as numeric (floating point numbers):
> summary.default( c( 1:2, NA))
Min. 1st Qu. Median Mean 3rd Qu.
2007 May 03
2
Parsing data with an uneven number of delimiters
I have a list of data that is delimited by a / and, as long as there is an equal number of delimiters, I can parse the data and put it into a data frame:
> t1<-c("a/a/a","b/bb/bbb","ccc/cc/c")
> t2<-strsplit(t1,"/")
> t3<-data.frame(t2)
> t3
c..a....a....a.. c..b....bb....bbb.. c..ccc....cc....c..
1 a
2005 Jun 22
1
substitute in a named expression
I have a 'named expression' like
expr <- expression(rep(1,d))
and would like to replace the argument d with say 5 without actually evaluating the expression. So I try substitute(expr, list(d=5)) in which case R simply returns expr which when I 'evaluate' it gives
eval(expr)
Error in rep.default(1, d) : invalid number of copies in rep()
I've looked at ?substitute and
2008 Apr 11
3
strsplit and sapply
Colleagues,
I have some text:
TEXT <- c("a", "bb;ccc", "dddd;eeeee;ffffff")
I want to retrieve the portion of each element before the first
semicolon. I can split each element using strsplit:
SPLIT <- strsplit(TEXT, ";")
This yields:
> SPLIT
[[1]]
[1] "a"
[[2]]
[1] "bb" "ccc"
[[3]]
[1] "dddd"
2013 Sep 10
1
[PATCH] show vector length in summary()
(summary.default): show the vector length in addition to quantiles
diff -u -i -p -F '^(def' -b -w -B /home/sds/src/R-3.0.1/src/library/base/R/summary.R.old /home/sds/src/R-3.0.1/src/library/base/R/summary.R
--- /home/sds/src/R-3.0.1/src/library/base/R/summary.R.old 2013-03-05 18:02:33.000000000 -0500
+++ /home/sds/src/R-3.0.1/src/library/base/R/summary.R 2013-09-10 10:19:02.682946339
2002 Jul 02
2
problem with qq( ) (PR#1729)
Full_Name: Jarno Tuimala
Version: 1.5.0
OS: Windows Nt
Submission from: (NULL) (193.166.1.21)
Running the following analysis gives as a result kukot vs. kisut.
aikaero <- -27.5+5*(0:10)
frekvenssi.m <- c(0,1,15,37,53,45,23,18,4,1,1)
frekvenssi.n <- c(2,8,12,19,33,47,42,15,2,1,0)
win.graph()
aikaero <- rep(c(aikaero,aikaero), c(frekvenssi.m,frekvenssi.n))
a.ero <-
2010 Oct 04
1
Help with apply
Suppose I have the following data:
tmp <- data.frame(var1 = sample(c(0:10), 3, replace = TRUE), var2 = sample(c(0:10), 3, replace = TRUE), var3 = sample(c(0:10), 3, replace = TRUE))
I can run the following double loop and yield what I want in the end (rr1) as:
library(statmod)
Q <- 2
b <- runif(3)
qq <- gauss.quad.prob(Q, dist = 'normal', mu = 0, sigma=1)
rr1 <- matrix(0,
2011 Mar 15
2
Matching two vectors
Dear R helpers
Suppose I have a vector as
vect_1 = c("AAA", "AA", "A", "BBB", "BB", "B", "CCC")
vect_1_id = c(1:length(vect_1))
Through some process I obtain
vect_2_id = c(2, 3, 7), then I need a new vector say vect_2 which will give me
vect2 = ("AA", "A", "CCC") i.e. I need the subset of
2014 Mar 21
3
Local account login failed when samba join to LDAP
Dears,
My samba version is 3.6.4
I have a problem to co-work with open LDAP server. When samba join to open LDAP server, my local account can NOT login samba anymore, only LDAP account can login.
When my samba come back to standalone, the local account is OK. Did I miss something?
The following is my configuration files, I list the part of them,
smb.conf
server string = "Samba Server"
2011 Mar 08
2
How to plot multiple graphs?
Dear R helpers,
I have following data.frame giving asset class (i.e. bank, corporate,
sovereign etc. as there could be number of classes) and rating-wise default
frequency.
I need to plot graphs for each of these classes i.e. bank, corporate and
sovereign where I will be plotting ratings (AAA, AA, etc) on the x-axis and
their respective default probabilities on Y-axis.
I have tried to write a
2009 Nov 01
2
Internal error in 'ls' for pathological environments (PR#14035)
nchar(with(list(2),ls())) gives an internal error. This is of course
a peculiar call (no names in the list), but the error is not caught
cleanly.
It is not clear from the documentation whether with(list(2)...) is
allowable; if it is not, it should presumably give an error. If it is, then
ls
shouldn't have problems with the resulting environment.
> qq <- with(list(2),ls())
2011 Feb 22
3
QQ International -- Almost works, but always says I'm "Away"
I got QQ International (version 1.0) to work via WINE under Mepis 8.5. Using winetricks, I installed all of the missing DLL's, and QQ now starts up and runs fine.
... except for the fact that it always shows me as being "Away". Even if I manually set my status to "Online", it changes me back to "Away" after a second or two.
This only happens under WINE. I log in
2012 Feb 17
1
QQ plot
Hello,
I am having two data set original and predicted.
I want to dind QQ-plot fot it.
I tried in following manner :
>qq(original~predicted)
and error was :
Error in qq.formula(o ~ p) : y must have exactly 2 levels
There is an option "qtype" which dosent make any difference.
What is the correct way for plotting QQ-plot or am I missing something.
--
Amar Kumar Nandan
2007 Mar 01
1
Generating R plots through Perl
Hello,
I am in the process of writing a Perl program to carry out and analyze
large numbers of regressions using R as the regression engine, and I am
using Statistics::R to create the communication bridge between the two
programs. Statistics::R creates a pipe between R and Perl and uses
Rterm.exe (hidden during run-time) to carry out the R commands. This
communication bridge works well for
2013 Feb 15
3
lattice 3x3 plot: force common y-limits accross rows and align x-axes
Good afternoon,
I would like to ask for help in controlling y-axis limits and labels in
lattice doplots. Unfortunately, the problem is somewhat convoluted,
please bear with the long explanation.
I would like to create a 3x3 lattice of dotplots, say subject ~ count.
The plot is conditioned on variables treatment and risk: subject ~ count
| treatment + risk. In the experiment, not all subjects
2023 May 31
11
[Bug 1685] New: Calling the nftnl_set_free function may trigger the "double free" problem.
https://bugzilla.netfilter.org/show_bug.cgi?id=1685
Bug ID: 1685
Summary: Calling the nftnl_set_free function may trigger the
"double free" problem.
Product: libnftnl
Version: unspecified
Hardware: All
OS: All
Status: NEW
Severity: critical
Priority: P5
2004 May 05
3
sip.conf and SIP client host= not recognized in some cases
I am seeing an issue with getting certain sip devices to be recognized as
defined SIP clients host= in the sip.conf and the only deference that I can
find btw sources that work and don't work is that devices that send packets
with an Initial Via header of themselves appears to work and pick the
context correctly but those that don't have the Via just get dropped in the
context of the
2007 Nov 13
1
a very easy question, how to extract the name of the response variable
This may not be the smoothest way to produce the result, but here is a
two-step solution:
first find the formula within the object created by the call to glm():
form <- qq["formula"] or equivalently form <- qq$formula
then apply the function all.vars() to the result, and return the first
element
variables.in.formula <- all.vars(form)
variables.in.formula[1] # will be the
2010 Jun 08
10
QQ International - How to troubleshoot an app that wont run?
As I mentioned in the subject, I have installed the latest version of QQ International (beta 3), under wine in ubuntu lucid.
It installs without much trouble, however when I run the application, nothing happens.
How do I begin troubleshooting this application to see if I can make it work?
Or if anyone happens to know of an x64 linux qq client that actually works that would be great too :D
2016 Oct 23
1
Guest startup process blocks if a hook's child process is still running (i.e : after forking)
I've been having issues with KVM lately where I sometimes put my host
into sleep while a guest is still running, which prevents it from waking
up properly. This is somewhat expected due to my setup, but I have
mistakenly done this more than once and could use a workaround to stop
this from happening.
So I've been trying to setup a libvirt hook to fork an instance of
systemd-inhibit