Displaying 6 results from an estimated 6 matches for "vloops".
Did you mean:
loops
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
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
2008 Dec 09
4
Slideshow with Ken-Burns Effect
Hi everybody,
I've had some time and so I added a slideshow creator with the Ken-Burns-Effect to the Ogg Video Tools. Feel free to visit the following page:
http://www.server.streamnik.de:88/test.html
It's best viewed with the Mozilla Firefox 3.1 Beta 2, but a Cortado Player is also available for the other browsers.
The code is actually not publically available, as I would like to add
2008 Dec 09
4
Slideshow with Ken-Burns Effect
Hi everybody,
I've had some time and so I added a slideshow creator with the Ken-Burns-Effect to the Ogg Video Tools. Feel free to visit the following page:
http://www.server.streamnik.de:88/test.html
It's best viewed with the Mozilla Firefox 3.1 Beta 2, but a Cortado Player is also available for the other browsers.
The code is actually not publically available, as I would like to add