Hi all,
I tested next command:
gsub("([aeiouAEIOU])([aeiouAEIOU])", "\\1_\\2", "aerioue")
with the following output:
[1] "a_eri_ou_e"
So, there are two consecutive vowels where an underscore is not added.
May it be a bug? Is it expected (bug or not)? Is there any chance to get
what I want
> Berwin A Turlach
> on Wed, 28 Feb 2024 17:42:27 +0800 writes:
> On Tue, 27 Feb 2024 13:51:25 -0800 Jeff Newmiller via
> R-help wrote:
>> The fundamental data type in Matlab is a matrix... they
>> don't have vectors, they have Nx1 matrices and 1xM
>> matrices.
Very interesting - thanks! Most of my problems are not limited by
compute speed, but its clear that for some sorts of compute-intensive
problems, sweep might be a limiting approach.
On 2/29/2024 6:12 PM, Richard M. Heiberger wrote:
> I decided to do a direct comparison of transpose and sweep.
>
I added two more rows
library(microbenchmark)
NN <- matrix(c(1, 2, 3, 4, 5, 6), nrow = 2, byrow = TRUE) # Example matrix
lambda <- c(2, 3, 4) # Example vector
colNN <- t(NN)
matlam <- matrix(lambda, byrow=TRUE, nrow=2, ncol=3)
microbenchmark(
sweep = sweep(NN, 2, lambda, "/"),
Dear Ivan,
Thank you very much for this interesting information.
Regarding:
"For well-behaved packages that declare their dependencies correctly,
parsing the NAMESPACE for importFrom() and import() calls should give
you the explicit imports."
I did learn something new (I am not very experienced
I decided to do a direct comparison of transpose and sweep.
library(microbenchmark)
NN <- matrix(c(1, 2, 3, 4, 5, 6), nrow = 2, byrow = TRUE) # Example matrix
lambda <- c(2, 3, 4) # Example vector
colNN <- t(NN)
microbenchmark(
sweep = sweep(NN, 2, lambda, "/"),
transpose =
The build system rolled up R-4.3.3.tar.gz and .xz (codename "Angel Food Cake")
this morning.
This is a minor update, intended as the wrap-up release for the 4.3.x series.
This also marks the 6th anniversary of R-1.0.0. (2000-02-29)
The list below details the changes in this release.
You can
Hi all,
I'm updating ESS by installing from source. I uncommented the MacOS related
lines from makeconfig, but I get this error:
>make
/bin/sh: /Applications/Emacs.app/Contents/MacOS/Emacs: No such file or directory
* VERSIONS **
ESS 24.01.1
ESSR 1.8
Thanks to all. Great ideas. I found Eik Vettorazzi's suggesstion easy to
implrment:
ebarm<-vbarm<-NULL
...
if (is.null(ebarm)) ebarm<-ame.00$ei/k else ebarm<-ebarm+ame.00$ei/k
if (is.null(vbarm)) vbarm<-ame.00$vi/k else vbarm<-vbarm+ame.00$vi/k
...
Steven Yen
On 2/29/2024 10:31 PM,
You could declare a matrix much larger than you intend to use. This works with
a few megabytes of data. It is not very efficient, so scaling up may become a
problem.
m22 <- matrix(NA, 1:60, ncol=6)
It does not work to add a new column to the matrix, as in you get an error if
you try m22[ ,
x <- numeric(0)
for (...) {
x[length(x)+1] <- ...
}
works.
You can build a matrix by building a vector one element at a time this way,
and then reshaping it at the end. That only works if you don't need it to be
a matrix at all times.
Another approach is to build a list of rows. It's not a
Dear Steven,
I used "sample" just to generate a non-trivial example, you could insert
your code of generating the real xi at this point :-)
If you want to stick to for-loops for some reasons, something like this
could work
x<-NULL
for (i in 1:5){
xi<-1:5
if (is.null(x)) x<-xi else
Hello Eik:
Thanks. I do not need to sample. Essentially, I have a do loop which
produces 24 vectors of length of some length (say k=300) and 24 matrices
of 300x300. Then, I simply need to take the averages of these 24
vectors and matrices:
x=(x1+x2+...+x24)/k
y=(y1+y2+...+y24)/k
I am
The first vector-oriented programming language I ever learned or used
was APL, and APL makes *no* distinction between row vectors and column
vectors. It has rank-0 (scalar), rank-1 (vector), rank-2 (matrix),
rank-3 ... and so on arrays. A rank-1 array is a rank-1 array is a
rank-1 array and
Agree that sweep is the tool here. (If you think it is clunky, check how more
general array-sweep operations can be done in Matlab.)
However, it isn't really true that sweep isn't moving things around. Notice
the call to aperm() at the end of the code for sweep():
perm <- c(MARGIN,
Yea, that worked. Thank you. :)
From: jim holtman
Sent: Wednesday, February 28, 2024 12:52 PM
To: Ebert,Timothy Aaron
Cc: r-help@r-project.org
Subject: Re: [R] Trouble reading a UTF-16LE file
[External Email]
Try this:
> x <- file("C:\\Users\\Jim\\Downloads\\PV2-ch2 - R_Help.ANA",
+
Try this:
> x <- file("C:\\Users\\Jim\\Downloads\\PV2-ch2 - R_Help.ANA",+
> encoding = "UTF-16")> y <- readLines(x)> head(y)[1] "1\t36,74\t0"
> "2\t269,02\t-44" "1\t326,62\t29""2\t354,52\t24"
[5] "8\t390,75\t1838" "2\t395,11\t-1053">
>
Thanks
Jim Holtman
*Data Munger
The earlier post had an attached text file that did not go through.
I hope this link works. I tested it with a coworker, but that is no guarantee.
https://uflorida-my.sharepoint.com/:u:/g/personal/tebert_ufl_edu/EXf5u_CtTwJCrhdfTBIPr7wBefZHx4P_suj4wAWb8i8HFA?e=iQawhh
Regards,
Tim
Dear R-help,
I am having trouble reading a UTF-16LE formatted file. The issue appears to
be a byte order mark at the beginning of the file. I have tried readLines(file,
encoding='utf-16LE') but that got me
[1]"\xff\xfe1" "" "" "" "" ""
This is a tab delimited text
When you specify LE you are overriding any useful information that the BOM
could convey... see
https://softwareengineering.stackexchange.com/questions/370088/is-the-bom-optional-for-utf-16-and-utf-32.
?Encoding
On February 28, 2024 5:44:49 AM PST, "Ebert,Timothy Aaron"
wrote:
>Dear R-help,
>
В Wed, 28 Feb 2024 13:44:49 +
"Ebert,Timothy Aaron" пишет:
> readLines(file, encoding='utf-16LE')
There are two ways you could encounter an encoding in R.
First are encoding markers placed on every string object, which declare
the string to be encoded in UTF-8, Latin-1, the native locale
Many thanks for the collective answers -- consider this a thank you to
the group. I had 'guessed' it had something to do with 'columns then
rows' or vice versa (MATLAB convention vs R convention), but had never
heard about 'sweep' before. Most of the time when I run into 'matrix
orientation'
Dear R-help,
I am having trouble reading a UTF-16LE formatted file. The issue appears to
be a byte order mark at the beginning of the file. I have tried readLines(file,
encoding='utf-16LE') but got me
[1]"\xff\xfe1" "" "" "" "" ""
Regards,
Tim
Hi Steven,
It's not entirely clear what you actually want to achieve in the end.
As soon as you "know" x1, and assuming that the different "xi" do not
differ in length in the real application, you know the length of the
target vector.
Instead of the loop, you can use 'Reduce' without having to
On Tue, 27 Feb 2024 14:54:26 -0500
Evan Cooch wrote:
> So, trying to convert a very long, somewhat technical bit of lin alg
> MATLAB code to R. Most of it working, but raninto a stumbling block
> that is probaably simple enough for someone to explain.
On
On Tue, 27 Feb 2024 13:51:25 -0800
Jeff Newmiller via R-help wrote:
> The fundamental data type in Matlab is a matrix... they don't have
> vectors, they have Nx1 matrices and 1xM matrices.
Also known as column vectors and row vectors. :)
> Vectors don't have any concept of "row" vs.
OK. I initialize real large vector and matrix and then shrink them when
I use them in the loop. The following lines worked. I'd glad to know of
better approaches.
bsum<-rep(0,1000); bsum
vsum<-matrix(rep(0,100),nrow=1000); vsum
for (ind in 1:3) { mydata <- read.csv(paste0("midata", ind,
On Tue, 27 Feb 2024 21:37:52 +
"Richard M. Heiberger" wrote:
> > t(t(NN)/lambda)
> [,1] [,2] [,3]
> [1,] 0.5 0.667 0.75
> [2,] 2.0 1.667 1.50
> >
>
> R matrices are column-based. MATLAB matrices are row-based.
It might depend on what you mean with this statement,
Is there as way to initialize a vector (matrix) with an unknown length
(dimension)? NULL does not seem to work. The lines below work with a
vector of length 4 and a matrix of 4 x 4. What if I do not know
initially the length/dimension of the vector/matrix?
All I want is to add up (accumulate)
В Sat, 24 Feb 2024 03:08:26 +
Leo Mada via R-help пишет:
> Are there any tools to extract the function names called by
> reverse-dependencies?
For well-behaved packages that declare their dependencies correctly,
parsing the NAMESPACE for importFrom() and import() calls should give
you the
... and here is a more or less direct translation of the Matlab code that
should now be obvious given your previous responses:
> m <- matrix(1:6, nr=2, byrow = TRUE) ## Matlab order
> m
[,1] [,2] [,3]
[1,]123
[2,]456
> sweep(m, 2, 2:4, "/")
[,1] [,2] [,3]
Why anything but sweep?
The fundamental data type in Matlab is a matrix... they don't have vectors,
they have Nx1 matrices and 1xM matrices.
Vectors don't have any concept of "row" vs. "column". Straight division is
always elementwise with recycling as needed, and matrices are really vectors
> t(t(NN)/lambda)
[,1] [,2] [,3]
[1,] 0.5 0.667 0.75
[2,] 2.0 1.667 1.50
>
R matrices are column-based. MATLAB matrices are row-based.
> On Feb 27, 2024, at 14:54, Evan Cooch wrote:
>
> So, trying to convert a very long, somewhat technical bit of lin alg
> MATLAB code to R.
So, trying to convert a very long, somewhat technical bit of lin alg
MATLAB code to R. Most of it working, but raninto a stumbling block that
is probaably simple enough for someone to explain.
Basically, trying to 'line up' MATLAB results from an element-wise
division of a matrix by a vector
I have no real idea what you are trying to do, but if a table is
what you want, you can probably get it using the table() function.
Or, more likely, the xtabs() function.
Using your example from an earlier post (adjusted to make it
comprehensible to the human mind):
set.seed(1000)
time <-
В Mon, 26 Feb 2024 11:52:13 +0100
пишет:
> TIFFOpen: figures/AES_network_bymembership.tiff: Cannot open.
> Warning message:
> In dev.off() :
> unable to open TIFF file 'figures/AES_network_bymembership.tiff'
In the current directory (see getwd()), is there a subdirectory named
"figures"? Do
Dear Ivan
Thanks a lot.
I used:
windowsFonts(Helvetica = windowsFont("Helvetica"))
No warning now with Helvetica
Additionally I used "sans", similarly no warning in the first part.
But still not able to open tiff with both versions:
Using "stress" as default layout
> dev.off()
TIFFOpen:
В Mon, 26 Feb 2024 09:02:56 +0100
SIBYLLE STÖCKLI via R-help пишет:
> In the following code, which loads the tiff file, I get the following
> error
This warning is definitely worth investigating, but it shouldn't
interrupt your code. Does the figure come out wrong after you see this
warning?
>
Hi,
I do not want to make a plot, I try to make an output table in R, (in GUI
like Stata this is trivially easy task)
with regard to SO OP question. As I mentioned, in paper I would not do
this, but out of curiosity I use R this time trying to create it.
If in R this is trivial task as well, could
Dear Kimmo
First of all many thanks for the valuable advice to publish code and csv.
Noted.
Yes, "edge.width= E(.)$weight" makes definitively sense.
In the following code, which loads the tiff file, I get the following error
tiff("figures/AES_network_bymembership.tiff", width=1000, height=700,
Hi,
a quick additional note: try
"edge.width= E(.)$weight"
instead of the current "edge.width= network". Seems to work and makes a
visible difference...
HTH,
Kimmo
su, 2024-02-25 kello 19:11 +, Kimmo Elo kirjoitti:
>
> Hi again,
>
> your code is still not reproducible without
Hi again,
your code is still not reproducible without modifications, but I
succeed in getting the data straight. All read.csv-command are missing
'sep="\t"', it is need to read you tsv-data.
And it could be more reproducible if you used e.g.
--- snip ---
aes<-read.csv(text="A.A B.B
It is trivial in R to add whatever decorations to a plot that you would
like, but that requires that you go beyond point and click production of
graphics and write actual code. If you are unwilling or unable to do this,
you are stuck with whatever various packaged graphics functionality
Hi All,
I stumbled upon some topics regarding interactions in anova and regression
and packages for tabulating and visualizations the results of them.
Here we are:
https://stackoverflow.com/questions/77933272/how-to-add-a-reference-level-for-interaction-in-gtsummary-and-sjplot/77935742#77935742
,
Dear R users,
I have a txt file named 'data_1.txt' whose first column contains the names
of the individuals and the other columns contain the values of four
variables X_1,X_2,X_3 and X_4. I read it with R from its location and
called it data. I'd like to do a normalized principal component
Dear coummunity
Thanks a lot to David and Kimmo. Yes I see now that I need to provide the two
raw tables. Find here the reproducible example.
Kind regards
Sibylle
# R-labraries
library(circlize)
library(ggplot2)
library(igraph)
library(tidyverse)
library(RColorBrewer)
library(stringi)
On 2/24/24 12:10, Kimmo Elo wrote:
Hi,
first of all, your example was not reproducible! But once I added
"library(igraph)" and "library(scico)" plus generally replaced
"aes_collapsed" by "edge_list", I started to work :-)
After copying your lead in that replacement the error I got was:
Hi,
first of all, your example was not reproducible! But once I added
"library(igraph)" and "library(scico)" plus generally replaced
"aes_collapsed" by "edge_list", I started to work :-)
Anyway, the error is produced by this line:
+ edge.width= network,
It seems to me that you have
Dear R-community
It would be nice to get some input how to find a solution for the following
error in igraph and vertex setting.
Error in intI(i, n = x@Dim[1], dn[[1]], give.dn = FALSE) :
Index größer als maximales 6
Kind regards
Sibylle
Working example
library(circlize)
library(ggplot2)
The reason html is specifically advised against as a format is that it
does things like mangling data such as is happening in your example. You
should repost using settings on you mail client for plain-text. Your
code should start by loading necessary packages. You should also not
post screen
Dear R-community
It would be nice to get some input how to find a solution for the following
error in igraph and vertex setting.
Thank you very much
Sibylle
> par(bg="black")
> network %>% plot(
+ vertex.color=clrs[V(.)$community],
+ vertex.size=V(.)$hub_score*1,
+
Dear R Users,
Are there any tools to extract the function names called by
reverse-dependencies?
I would like to group these functions using clustering methods based on the
co-occurrence in the reverse-dependencies.
Utility: It may be possible to split complex packages into modules with fewer
Sent from my iPhone
> On Feb 23, 2024, at 18:19, Sorkin, John wrote:
>
> David,
>
> I greatly appreciate the explanation you gave regarding R tools providing
> tools available in Linux distros, but not found in Windows. (I am using a
> windows system). Does this mean that Linux users
David,
I greatly appreciate the explanation you gave regarding R tools providing tools
available in Linux distros, but not found in Windows. (I am using a windows
system). Does this mean that Linux users don't need to use R tools when they
want to compile R code?
Additionally, thank you for
On 2/23/24 16:28, Sorkin, John wrote:
> David,
> My apologies regarding the format of my email. I am replying using my
> iPhone, and I can’t find a way to switch from what I suspect is html
> to txt format.
> The link you sent told me that R tools allows compilation of code.
It's
RTools is a set of command-line programs needed for compiling R and its
packages on Windows. You don't need it if your OS is not Windows.
In theory, users on Windows should not need to worry about compiling packages
to binary (zip) form, because CRAN compiles the source code for every package
On 2/23/24 15:39, Sorkin, John wrote:
Avi ,
Your question is not dumb. Let me ask a more fundamental question. What is R
tools, what does it do, and how is it used. From time to time, I receive a
message when I down load a package saying I need R tools. When I receive the
message, I don’t
On 2/23/24 14:34, avi.e.gr...@gmail.com wrote:
> This may be a dumb question and the answer may make me feel dumber.
>
> I have had trouble for years with R packages wanting Rtools on my machine
> and not being able to use it. Many packages are fine as binaries are
> available. I have loaded
Avi ,
Your question is not dumb. Let me ask a more fundamental question. What is R
tools, what does it do, and how is it used. From time to time, I receive a
message when I down load a package saying I need R tools. When I receive the
message, I don’t know what I should do, other than down load
This may be a dumb question and the answer may make me feel dumber.
I have had trouble for years with R packages wanting Rtools on my machine
and not being able to use it. Many packages are fine as binaries are
available. I have loaded Rtools and probably need to change my PATH or
something.
The data came through fine, the program was a miss. Can you paste the program
into a ".txt" document like a notepad file and send that? You could also paste
it into your email IF your email is configured to send text and NOT html.
TIm
-Original Message-
From: R-help On Behalf Of Pedro
Does the grid.echo function in the gridGraphics package do what you want?
Description
Convert a scene that was drawn using the graphics package to an identical scene
drawn with the
grid package.
> On Feb 21, 2024, at 22:49, Reed A. Cartwright wrote:
>
> Hi All,
>
> I'm building an autograding
Hi Michael:
Yes, a manual intervention appears to be necessary. So copy
that file over and hopefully then it will work. FWIW. I installed
ESS with �make� and then �make install� for emacs 29.1.
--
Rodney Sparapani, Associate Professor of Biostatistics, He/Him/His
Vice President, Wisconsin
Às 16:34 de 22/02/2024, Pedro Gavronski. escreveu:
Hello,
My name is Pedro and it is nice to meet you all. I am having trouble
understanding a message that I receive when use function ar.ols from
package stats, it says that "Warning message:
In ar.ols(x = dtb[2:6966, ], demean = FALSE,
On Thu, Feb 22, 2024 at 04:27:18PM +, Sparapani, Rodney via ESS-help wrote:
Hello, Rodney!
> I see this function in etc/ESSR/R/.load.R on line 12.
> So could you please double-check? Thanks
I don't see this file in the installed directory,
/usr/share/emacs/etc/ess/ESSR/R, but it is in the
Hi Michael:
I see this function in etc/ESSR/R/.load.R on line 12.
So could you please double-check? Thanks
--
Rodney Sparapani, Associate Professor of Biostatistics, He/Him/His
Vice President, Wisconsin Chapter of the American Statistical Association
Institute for Health and Equity, Division of
I agree that the posting guide is due for updating.
If the mailing list maintainers were willing I think r-consult might
not be a terrible idea. I do think the center of gravity has moved to
Cross Validated, and it might be minimally sufficient to point people
there (or Math Overflow for
Lisa, this seems to be fairly straight forward to do in R and I'm happy to help
you get started. However, please be aware that you do have to have knowledge of
statistics to do the analysis/modeling.
Rolf, Jeff, I do appreciate your view that this is not a R probelm. It's more a
'how to use
Hi All,
I'm building an autograding framework for my biostatistics class this
semester, and I am exploring different ways to automatically grade
figures.
In other classes, I teach ggplot2 and I extract information directly
from the ggplot2 object. However, in this class we are using base R
and I
Hi Stephen,
Thanks again for getting back to me, Ivan Krylov responded also and suggested
windows binaries and I must confess I was only familiar with installing from
files via the package sources (apart from the conventional install.packages
method), so the solution was as simple as installing
Dear James,
the fact you can download the packages via Chrome but not in R/RStudio might
indicate that your browser uses a proxy server that is not known to R. Maybe
you have to configure it (e.g.
https://stackoverflow.com/questions/6467277/proxy-setting-for-r#8297685)
appropriately?
Best
On Thu, Feb 15, 2024 at 04:19:43PM +, Sparapani, Rodney via ESS-help wrote:
> Hi Gang:
>
> We just tidied up a recent insidious bug. No other changes.
>
> Version 24.1.1 of package ESS has just been released in GNU ELPA.
> You can now find it in M-x list-packages RET.
I have just
Hi Stephen,
Thanks very much for getting back to me. My problem is described below. Any
help would be greatly appreciated. Thanks, James
Hi,
Sorry for bothering you because I know that your time is voluntary, but I would
really appreciate some help. I work in a hospital in part of Ireland’s
Hi Ivan,
Thanks very much for your response, I'll definitely give that a go. Best
wishes, James
-Original Message-
From: Ivan Krylov
Sent: Wednesday 21 February 2024 10:38
To: James Powell
Cc: r-help@r-project.org
Subject: Re: [R] Network issue
CAUTION: This email originated from
В Wed, 21 Feb 2024 06:09:51 +
James Powell пишет:
> This was working fine until yesterday when I had error messages
> trying to install some packages. See enclosed “S2” for example. It
> looks like it is trying to download a file as part of the
> installation, but of course can’t.
Since
Hi Stephen,
I didn’t see this suggested previously, but yes I have made repeated attempts
to gain access to CRAN via R but to no avail. Mirroring CRAN is a really good
idea, but I’m not sure how to get R to recognise the local file locations when
the installation files seek access to CRAN via
Hallo James
Just a wild guess, are your problems connected with change of default
download method from wininet to libcurl?
Cheers
Petr
út 20. 2. 2024 v 18:24 odesílatel James Powell napsal:
>
[[alternative HTML version deleted]]
__
Regarding 1 and 2, please read the Posting Guide mentioned at the bottom of
every R-help post. R does not equal statistics... and education about
statistics is way too ambitious to include in this mailing list that is about a
tool that happens to be useful for statisticians.
There are forums
On Mon, 19 Feb 2024 17:39:23 +0100
Lisa Hupfer via R-help wrote:
> I am writing my master thesis in which I compared two cultures . So
> for my statistics I need to compare Age,Sex,Culture as well as have a
> look at the tasks scores .
>
> Anyone familiar with this ?
> I’d love to share my
... and if the problem is networking, then you will likely need help from
someone who knows your local configuration. Employers often do things that
limit what R can do, and none of us are likely to know about those things.
On February 20, 2024 11:43:24 AM PST, stephen sefick wrote:
>Maybe I
Maybe I missed the rest of the post? You are more likely to get help with
your problems if you create a minimal reproducible example.
Kindest regards,
Stephen Sefick
On Tue, Feb 20, 2024, 12:24 James Powell wrote:
>
[[alternative HTML version deleted]]
What happens if you add a line to the code in lines 1-5. So line 5 is now
line 6 etc?
Your "procedure" needs a name
So either it's a function, OR, we each procedure is a file to source?
On Tue, 20 Feb 2024, 16:55 Steven Yen, wrote:
> I see——still put those lines in a procedure and call the
I am writing my master thesis in which I compared two cultures . So for my
statistics I need to compare Age,Sex,Culture as well as have a look at the
tasks scores .
Anyone familiar with this ?
I’d love to share my script so you guide me where I did wrong .
Regards
R version 4.3.1 (2023-06-16 ucrt) -- "Beagle Scouts"
Copyright (C) 2023 The R Foundation for Statistical Computing
Platform: x86_64-w64-mingw32/x64 (64-bit)
R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or
Are you asking to source lines 5-10 of a file for instance?
Never seen that done in R. Feels a dodgy thing to do as changing line will
screw things up. On the other hand - I'd often have functions in a file
called perhaps "functions.R" and source("functions.R")
Then I can call an individual
I believe you will have to expain what you want more fully, as what you
requested appears to be exactly what source() does, to me anyway. Please
reread its help file more carefully perhaps?
-- Bert
On Tue, Feb 20, 2024 at 7:36 AM Steven Yen wrote:
> How can I call and include an external set
How can I call and include an external set of R codes, not necessarily a
complete procedure (which can be include with a “source” command). Example:
#I like to include and run the following lines residing in a file outside the
main program:
mydata<-transform(mydata,
a<-b+c
d<-e+f
}
Steven
Steven from iPhone
> On Feb 19, 2024, at 4:56 PM, Steven Yen wrote:
>
> Thanks to all. Glad there are many options.
>
> Steven from iPhone
>
>>> On Feb 19, 2024, at 1:55 PM, Rui Barradas wrote:
>>>
>> Às 03:27 de 19/02/2024, Steven Yen escreveu:
>>> I need to read csv files repeatedly,
Is it possible that there is a version skew between binaries and source
packages?
If you try the RStudio Update option, which versions does it claim that you
have installed? If it is the same versions that you download, then no wonder
that the update doesn't change anything.
E.g. I see that
Hi Dirk:
Glad you resolved it with the help of others here at ESS-help.
FWIW, both of these should be exactly the same version.
Martin committed the fix on 01/31 and triggered the ELPA
version 24.01.1. Theoretically, we could move to a MMDD.micro
naming convention for ESS. However, we have
Thanks Ivan and Iris for your solutions, I'll look over them.
The solution that I came up with last night involves creating a
function that has the same formals signature as the wrapped function
and relying on `environment()` and `list(...)` to return a function's
variables at the beginning of
In my package HelpersMG, I have included a function to read in one time
all the files of a folder and they are stored in a list:
read_folder(
folder = try(file.choose(), silent = TRUE),
file = NULL,
wildcard = "*.*",
read = read.delim,
...
)
In your case, for example:
Às 03:27 de 19/02/2024, Steven Yen escreveu:
I need to read csv files repeatedly, named data1.csv, data2.csv,… data24.csv,
24 altogether. That is,
data<-read.csv(“data1.csv”)
…
data<-read.csv(“data24.csv”)
…
Is there a way to do this in a loop? Thank you.
Steven from iPhone
f <- function (filename) {
data<- read.csv(filename)
..
}
for (filename in paste0("data", 1:24, ".csv")) f(filename)
Depending on what exactly you have in your file system,
for (filename in system("ls data*.csv", TRUE)) f(filename)
might work.
On Mon, 19 Feb 2024 at 16:33, Steven Yen
Steven,
It depends what you want to do. What you are showing seems to replace the
values stored in "data" each time.
Many kinds of loops will do that, with one simple way being to store all the
filenames in a list and loop on the contents of the list as arguments to
read.csv.
Since you show
On 18 February 2024 at 20:54, Brett Presnell via ESS-help wrote:
|
| Forgot to mention that you may need to uninstall and reinstall the ess
| package after putting the :pin in place, but I'm not sure about that.
| Restarting emacs is maybe needed too, but not sure about that either.
The pin,
Try
for (ind in 1:24)
{
data = read.csv(paste0("data", ind, ".csv"))
...
}
Peter
On Mon, Feb 19, 2024 at 11:33 AM Steven Yen wrote:
>
> I need to read csv files repeatedly, named data1.csv, data2.csv,… data24.csv,
> 24 altogether. That is,
>
> data<-read.csv(“data1.csv”)
> …
>
I need to read csv files repeatedly, named data1.csv, data2.csv,… data24.csv,
24 altogether. That is,
data<-read.csv(“data1.csv”)
…
data<-read.csv(“data24.csv”)
…
Is there a way to do this in a loop? Thank you.
Steven from iPhone
[[alternative HTML version deleted]]
Forgot to mention that you may need to uninstall and reinstall the ess
package after putting the :pin in place, but I'm not sure about that.
Restarting emacs is maybe needed too, but not sure about that either.
__
ESS-help@r-project.org mailing list
Hi Dirk. If you use use-package, you can pin the package source for ess
to gnu-elpa like this:
(use-package ess
:ensure t
:pin gnu)
Documentation for use-package can be found here:
https://www.gnu.org/software/emacs/manual/html_node/use-package/index.html
Section 5.2 discusses :pin.
601 - 700 of 269087 matches
Mail list logo