Displaying 20 results from an estimated 9000 matches similar to: "Unexpected result of names<-"
2007 Jun 21
4
"if" within a function
Dear Friends.
I found a puzzling phenomenon in R when you use 'if' within a function:
# defining a function aaa
aaa=function(a)
{if (a==1) {aaa=1};
if (a!=1) {aaa=2}
}
# using the function:
> b=20
> bbb=aaa(b)
> bbb
[1] 2
> typeof(bbb)
[1] "double"
>
>
> c=1
> ccc=aaa(c)
> ccc
NULL
> typeof(ccc)
[1] "NULL"
It seems that only the last
2005 Nov 28
3
Looking for constrained optimisation code
_______________________________________________________________________________________
Hi,
I was just wondering if there was any available R code that could handle
general constrained optimisation problems. At the moment I'm using
nlminb and optim, both of which allow box constraints on the parameters,
but ideally I'd like to be able to specify more general constraints on
the solution
2005 Dec 14
1
Glitch when creating online help
_______________________________________________________________________________________
Hi,
I'm writing up the online help for a package I'm developing (in-house
only, sorry), and I've come across an odd glitch when trying to nest a
list inside the "arguments" section of the .Rd file. I was just
wondering if anyone could provide some insights. I'm using R 2.2.0 on
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
2012 Apr 17
3
Can a matrix have 'list' as rows/columns?
After a lot of processing I get a matrix into M. I expected each row and
column to be a vector. But it is a list.
R-Inferno says...
"Arrays (including matrices) can be subscripted with a matrix of positive
numbers. The subscripting matrix has as many columns as there are dimensions
in the array—so two columns for a matrix. The result is a vector (not an
array)
containing the selected
2010 Nov 30
2
xyplot : superimposed 2 groups in different panels
Hello,
I would like to plot the following xyplot : for each date of fff (1 date per
panel), bbb=f(aaa) for the two groups (ddd=1 and ddd=2) superimposed.
I can do it by group (see below) but not together.
I looked at http://lmdvr.r-forge.r-project.org/figures/figures.html but I
haven't found what I was looking for (to be honest, I haven't understood all
the examples).
Any help will be
2017 Jun 14
8
[WISH / PATCH] possibility to split string literals across multiple lines
Hi,
I would really like to have a way to split long string literals across
multiple lines in R.
Currently, if a string literal spans multiple lines, there is no way to
inhibit the introduction of newline characters:
> "aaa
+ bbb"
[1] "aaa\nbbb"
If a line ends with a backslash, it is just ignored:
> "aaa\
+ bbb"
[1] "aaa\nbbb"
We could use
2017 Jun 14
4
[WISH / PATCH] possibility to split string literals across multiple lines
On Wed, 14 Jun 2017 06:12:09 -0500, Duncan Murdoch <murdoch.duncan at gmail.com> wrote:
> On 14/06/2017 5:58 AM, Andreas Kersting wrote:
> > Hi,
> >
> > I would really like to have a way to split long string literals across
> > multiple lines in R.
>
> I don't understand why you require the string to be a literal. Why not
> construct the long
2014 Feb 11
2
Some LDA questions!
Hi there!
I have been setuped exim and dovecot.
Exim uses dovecot-lda to deliver mails to mailbox.
Some configurations of exim:
dovecot_virtual_delivery:
? driver = pipe
? command = /usr/libexec/dovecot/dovecot-lda -d $local_part@$domain -f $sender_address
? message_prefix =
? message_suffix =
? delivery_date_add
? envelope_to_add
? return_path_add
? log_output
? user = vmail
? group = vmail
?
2008 Aug 29
1
nls() fails on a simple exponential fit, when lm() gets it right?
Dear R-help,
Here's a simple example of nonlinear curve fitting where nls seems to get
the answer wrong on a very simple exponential fit (my R version 2.7.2).
Look at this code below for a very basic curve fit using nls to fit to (a)
a logarithmic and (b) an exponential curve. I did the fits using
self-start functions and I compared the results with a more simple fit
using a straight lm()
2010 Mar 05
1
About the interaction A:B
Suppose, 'fr' is data.frame with columns 'Y', 'A' and 'B'. 'A' has levels 'Aa'
'Ab' and 'Ac', and 'B' has levels 'Ba', 'Bb', 'Bc' and 'Bd'. 'Y'
columns are numbers.
I tried the following three sets of commands. I understand that A*B is
equivalent to A+B+A:B. However, A:B in A+B+A:B is
2006 Oct 10
1
error in dput applied to dataframe (PR#9286)
Full_Name: Daniel F Higgins
Version: 2.4.0
OS: Windows XP and Mac OSX
Submission from: (NULL) (128.111.242.49)
Create a dataframe as indicated below and apply 'dput' to it; note that the
row.names attribute is incorrect!
> aaa <- c("AAA","BBB","AAA")
> bbb <- c(1,2,3)
> df <- data.frame(aaa,bbb)
> dput(df)
structure(list(aaa =
2011 Mar 08
1
How to sort using a predefined criterion
Dear R helpers,
Suppose I have following data.frame.
df <- data.frame(category = c("treat_A", "treat_A", "treat_A", "treat_A", "treat_A", "treat_A", "treat_A", "treat_A", "treat_B", "treat_B", "treat_B", "treat_B", "treat_B", "treat_B",
2017 Jun 14
2
[WISH / PATCH] possibility to split string literals across multiple lines
I don't think it is reasonable to change the parser this way. This is
currently valid R code:
a <- "foo"
"bar"
and with the new syntax, it is also valid, but with a different
meaning. Or you can even consider
a <- "foo"
bar %>% func() %>% print()
etc.
I like the idea of string literals, but the C/C++ way clearly does not
work. The Python/Julia way
2018 Feb 07
2
Windows 10 Office 2016 slow accessing samba network shares
I have a to a samba server (4.4.16) on built on Solaris 11 samba pkg. It is a member of an Active directory domain. Users, for some time, have been experiencing long (20 -40 second) delays when browsing to, opening and writing a network share on the server. Attempts to do any of those results in a dialogue box being displayed showing:
Contacting server: \\<server-name> \share
1999 May 27
2
Can't connect to samba from foreign network --- 'Gethostbyaddr failed' error in log.smb
I have a samba server at ip address
aaa.bbb.ccc.ddd
I can connect to it from clients on subnets aaa.bbb.eee. and
aaa.bbb.fff.
I can't connect to it from clients on ggg.hhh.
smb.conf has
hosts deny = all
hosts allow = localhost, aaa.bbb., ggg.hhh.
The client can successfully 'ping mysambaserver' (resolves to
aaa.bbb.ccc.ddd). Doing 'net view \\mysambaserver' fails with
2010 Aug 30
2
Band-wise Conditional Sum - Actual problem
Dear R helpers,
Thanks a lot for your earlier guidance esp. Mr Davind Winsemius Sir. However, there seems to be mis-communication from my end corresponding to my requirement. As I had mentioned in my earlier mail, I am dealing with a very large database of borrowers and I had given a part of it in my earlier mail as given below. For a given rating say "A", I needed to have the bad-wise
2006 Mar 14
9
firewall problem
snat not working
my local ip is aaa.aaa.aaa.aaa
asterisk sitting on the internet at ip bbb.bbb.bbb.bbb
my firewall''s internal ip is 192.168.0.254
i did snat:
iptables -t nat -A POSTROUTING -o ppp0 -j SNAT --to aaa.aaa.aaa
iptables -t nat -L -v gives:
Chain POSTROUTING (policy ACCEPT 23663 packets, 2182K bytes)
pkts bytes target prot opt in out source
destination
33056
2012 Sep 20
3
[LLVMdev] TBAA fail on optimization, why?
hi,
i have a simple code like below, in wich variable "aaa" does not alias
to "bbb".
i use TBAA to specify this, please see the code.
then i ran this code thru LLVM optimization, and i expected that the
second "store" instruction is eliminated.
however, i am wrong: the second "store" instruction is still there
after optimization.
perhaps my TBAA setup is
2003 May 01
4
var[i]
Dear all,
How could I use variables in a loop that their names are in a vector?
For example:
aaa <- 1:10
bbb <- aaa*2
ccc <- aaa+bbb
varn <- c("aaa", "bbb", "ccc")
m <- rep(NA, 3)
for (i in 1:length(varn)) m[i] <- mean(varn[i]) # wrong
thanks in advance
Juli
--
"Wars do not solve problems, wars generate even more problems"