Displaying 20 results from an estimated 6000 matches similar to: "Using optimize with array variables"
2024 Jun 16
2
slowness when I use a list comprehension
Dear RHelp-list,
?? I try to use the package comprehenr to replace a for loop by a list
comprehension.
?I wrote the code but I certainly miss something because it is very
slower compared to the for loops. May you please explain to me why the
list comprehension is slower in my case.
Here is my example. I do the calculation of the square difference
between the values of two vectors vec1 and
2024 Jun 16
1
slowness when I use a list comprehension
Laurent,
Thank you for introducing me to a package I did not know existed as I use features like list comprehension in python all the time and could see using it in R now that I know it is available.
As to why you see your example as slow, I see you used a fairly complex and nested expression and wonder if it was a better way to go. As you are dealing with an interpreter doing delayed
2024 Jun 16
1
slowness when I use a list comprehension
This can be vectorized. Try
ix <- seq_along(vec2)
S_diff2 <- sapply(seq_len(N1-(N2-1)*ratio_sampling), \(j)
sum((vec1[(ix-1)*ratio_sampling+j] - vec2[ix])**2))
On Sun, Jun 16, 2024 at 11:27?AM Laurent Rhelp <laurentRHelp at free.fr> wrote:
>
> Dear RHelp-list,
>
> I try to use the package comprehenr to replace a for loop by a list
> comprehension.
>
> I
2024 Jun 16
1
slowness when I use a list comprehension
I would be more strong on this advice: learn to think in R, rather than thinking in Python, when programming in R. R has atomic vectors... Python does not (until you import a package that implements them). I find that while it is possible to import R thinking into Python, Python programmers seem to object for stylistic reasons even though such thinking speeds up Python also.
A key step in that
2024 Jun 16
1
slowness when I use a list comprehension
I fully agree with Jeff that the best way to use ANY language is to evaluate
the language in terms of not just the capabilities it offers but also the
philosophy behind what it was created for and how people do things and just
grok it and use it mostly in the way intended. I do that with all the
languages I learn, whether for computers or humans.
Bringing in something you like from another
1998 Dec 09
1
Creating new folder in a WIN95 explorer czech version.
I can't create new folder in a czech Win95 explorer on a unix using samba 1.9.18p7. The problem is that Windows exporer uses for the creation new folder a name containing characters above 128.
The explorer creates new folder in a two phases: the first It creates directory named Nov<A0> slo<A7>zka and next it gives to user
posibility to change this name. Crazy !!? The first phase
2005 Jan 08
2
Does R accumulate memory
Dear List:
I am running into a memory issue that I haven't noticed before. I am
running a simulation with all of the code used below. I have increased
my memory to 712mb and have a total of 1 gb on my machine.
What appears to be happening is I run a simulation where I create 1,000
datasets with a sample size of 100. I then run each dataset through a
gls and obtain some estimates.
This works
2010 Sep 26
3
Newbie Correspondence Analysis Question
I'm experienced in statistics, but I am a first-time R user. I would like to use R for correspondence analysis. I have installed R (Mac OSX). I have used the package installer to install the CA package. I have run the following line with no errors to read in the data for a table:
NonLuxury <- read.table("/Users/myUserName/Desktop/nonLuxury.data.txt")
The R online help
2007 Sep 27
1
error message in eval
Hello, Listers
I'm trying to run blloean logit model with R.
My code is:
> library(boolean)
> library(foreign)
> pr <- read.dta ("prcore1.dta")
> bp <- boolprep ("(a&b)|c", "cwt", a="O1", b="t", c="DM2
> + ah + md + con + n3 + rel + slo + pyrs
> + sp1 + sp2 + spl3")
> answer <- boolean (bp, link =
2010 Sep 26
4
How to update an old unsupported package
Hi all,
I have a package that is specific to a task I was repetitively using a
few years ago.
I now needed to run it again with new data.
However I am told it was built with an older version or R and will not work.
How can I tweak the package so it will run on 11.1?
It was a one-off product and has not been maintained.
Is there a way to "unpackage" it and repackage it to work?
I
2020 Jun 30
2
[cfe-dev] Phabricator Maintenance
I want to bubble out of this discussion, because most of the conversation has been about merit of various tools, how much the cloud license costs, etc.
In my opinion, none of this actually matters. There are much larger strategic questions that we should be talking about instead:
1) Why is LLVM special? We are a tiny community compared to the larger GitHub community - anything that makes us
2002 May 01
1
compiling R-1.5.0, package methods, on Solaris 5.7
Compiling package methods, R-1.5.0, on Solaris 5.7 failed (output below)
for me with
- gcc-2.95.3, perl-5.005_03
and also
- gcc-3.0.4, perl-5.6.1
Any ideas a) what the problem is or even better b) how to solve it?
Uwe Ligges
===================================
[...]
building package 'methods'
../../../library/methods/man/methods.Rd is unchanged
making do_substitute_direct.d from
2007 Dec 04
1
dovecot errors after upgrade to 5.1
Everyone,
Looks like my Centos 5.0 mail server upgraded automatically last night
to 5.1. It appears to have worked normally until about 16:00 CST when
dovecot began to fail. I have rebooted the system to be able to use the
5.1 kernel, but dovecot still continues to fail.
Has anyone else made this observation?
My log entries are below
Thanks in advance!!!!
Greg Ennis
2016 Aug 29
2
No network using qemu-kvm-ev-2.3.0-31.el7.16.1
Hello, this could be issue with firewall or netfilter on bridge
S pozdravem Kristi?n Feldsam
Tel.: +420 773 303 353
E-mail.: admin at feldhost.cz
www.feldhost.cz - FeldHost poskytuje kvalitn? hostingov? a serverov? slu?by za p??znivou cenu.
FELDSAM s.r.o.
V rohu 434/3
Praha 4 ? Libu?, PS? 142 00
I?: 290 60 958, DI?: CZ290 60 958
C 200350 veden? u M?stsk?ho soudu v Praze
Banka: Fio banka a.s.
2015 Jul 23
2
rsyslog.conf
Leon Fauster wrote:
> Am 23.07.2015 um 18:06 schrieb "Valeri Galtsev"
> <galtsev at kicp.uchicago.edu>:
>>
>> On Thu, July 23, 2015 10:45 am, Johnny Hughes wrote:
>>>
>>> The main reason actually is chronological order. But not just for the
>>> reply .. but for IN-LINE posting.
>>>
>>> In a discussion where you need to
2012 Apr 03
5
process_sdp: Multiple audio streams are not supported
Hello folks, I'm running 1.8.11 on a Centos 6 system with an adjacent
Hylafax server using softmodems:
Noticed this in the Asterisk log when trying to send a fax from
Hylafax to Asterisk:
[Apr 3 01:53:09] WARNING[29184]: chan_sip.c:8926 process_sdp:
Multiple audio streams are not supported
I've googled a few asterisk tickets that may suggest that yes,
multiple audio streams are not
2011 Feb 10
3
Separate access to different "folders" of the same mailbox?
Hello Timo and everyone,
I think on such an idea that may save me a bit of space and time:
in my company we have a mailbox that holds a copy of every message that
our SMTP processed. While it eats a lot of space, it saved us several
times when, you may imaging, user "suddenly" deleted the most important
message in his life and call our IT guys for help. The mailbox contains
2013 Nov 27
2
Samba4 - ACL not applied/followed (worked in samba 3.0.11)
Hi.
samba 4.1.1.. User has unix rights for writing, but samba denies write
access to him.
On samba server:
amistest at samba:~$ id
uid=6603(amistest) gid=20(users-nis)
groups=20(users-nis),2108(evis),2109(slp),2112(hernie),2126(poj),2133(hto),20000(users)
-> user amistest is in "poj" group
amistest at samba:~$ ls -ld ACLTEST
drwxrwxr-x+ 2 hrubos vema 4096 Nov 27 11:05 ACLTEST
2002 Jul 16
1
methods: representation gives "unused arguments" on failure (PR#1796)
Full_Name: Markus Jantti
Version: 1.5.1
OS: GNU/Linux Unstable (Sid)
Submission from: (NULL) (193.166.59.44)
I was trying to get the package yags 3.20 by Vince Carey
<stvjc@channing.harvard.edu>
to run, but - after successfull installation -- loading the library failed with
the
message
> library(yags)
Error in stop(paste("Duplicated slot names: ", paste(slots[duplicated(slo
2012 Sep 27
3
NUT Bugs #313634 & #313714: unification & encapsulation of timer proposition
?Hello everybody,
I'm working on the "Use difftime for time comparison" bug (#313634).
Charles directed me to the other one "Use monotonic clock for monitoring"
attended to by Baruch; I believe that's very good idea, however I'd use a bit
more encapsulated & general approach:
1/ I'd create an opaque timer type and its get/set/cmp/inc/dec etc interface