Displaying 20 results from an estimated 2000 matches similar to: "Looping through names of both dataframes and column-names"
2010 Jan 10
2
data frame names in sequence
I've been stuck with this problem for a whole afternoon. It's silly but
totally pissed me off. I have a set of data frames with names in a sequence:
df_1, df_2, df_3, ..., df_20. Now I want to access each data frame (read or
write) in a for loop, in a way something like this:
for (i in 1:20) {
df_i <- ######
length(which(df_i[,7]==1))
######
}
I tried paste or cat
2023 Mar 14
2
Resultado operación entre dataframes
Buen día estimados,
Tengo el siguiente código:
df_1 <- data.frame(ana = c(15, 20, 30), maria = c(15,20,30), jose = c(15,
20, 30))
df_2 <- data.frame(nombre = c("jose", "ana", "maria"), valor = c(1,2,3))
# Find the corresponding columns in df_1 based on the values in df_2$nombre
cols <- match(df_2$nombre, names(df_1))
# Subtract the values of df_2$valor
2006 Mar 09
1
Suppress legend in plotting groupedData
Dear All,
I would be grateful if you can tell how can I suppress the legend (automatically created) when I plot a groupedData.
suppose that I have data farme df_0 which contains the following columns: ID represents the clusters, t represents time of observation, Y: the variable of interest and X a binary covariate. Then:
df_1 <- groupedData(Y ~ t | ID)
plot(df_1,
2017 May 02
1
Any progress on write.csv fileEncoding for UTF-16 and UTF-32 ?
On 01/05/2017 8:49 PM, Jack Kelley wrote:
> Thanks for looking into this.
>
> A few notes regarding all the UTF encodings on Windows 10 ...
This all stems from the ancient bad decision by Microsoft to translate
LF characters to CR LF when writing text files. R passes 0A or 0A 00 or
0A 00 00 00 to the output routine (part of the C run-time), and it needs
to figure out how many
2017 May 01
3
Any progress on write.csv fileEncoding for UTF-16 and UTF-32 ?
On 30/04/2017 12:23 PM, Duncan Murdoch wrote:
> No, I don't think anyone is working on this.
>
> There's a fairly simple workaround for the UTF-16 and UTF-32 iconv
> issues: don't attempt to produce character vectors, produce raw vectors
> instead. (The "toRaw" argument to iconv() asks for this.) Raw vectors
> can contain embedded nulls. Character vectors
2017 May 02
0
Any progress on write.csv fileEncoding for UTF-16 and UTF-32 ?
Thanks for looking into this.
A few notes regarding all the UTF encodings on Windows 10 ...
The default eol for write.csv (via write.table) is "\n" and always gives
as.raw (c (0x0d, 0x0a)), that is, <Carriage Return> <Line Feed> as adjacent
bytes. This is fine for UTF-8 but wrong for UTF-16 and UTF-32.
EXAMPLE: Using UTF-32 for exaggeration (note also that 3 nul bytes are
2023 Mar 07
2
Bug#1032480: xen: Important cherry-picks for bookworm/updates
Package: src:xen
Version: 4.17.0+46-gaaf74a532c-1
Severity: important
Two major bugs have shown with the release of new hardware from AMD.
Since the new hardware is likely to become common during the life of
Debian/bookworm, you may wish to grab them early:
ad15a0a8ca2515d8ac58edfc0bc1d3719219cb77
x86/time: prevent overflow with high frequency TSCs
Turns out the latest generation is fast enough
2020 Jul 18
25
[PATCH 00/12] Bunch of patches for cross-compilatio + RP4
Initially out there as #965245.
I strongly prefer to build ARM64 packages on non-ARM systems. Something
about my main build machine having twice the cores and twice the clock
speed. As such after many builds I've managed to generate a set of
patches which appear to mostly function to get functioning cross-builds
of Xen.
These are NOT a 100% solution. Some packaging hacks were needed. In
2017 May 13
2
Bug#810964: [Xen-devel] [BUG] EDAC infomation partially missing
I haven't yet done as much experimentation as Andreas Pflug has, but I
can confirm I'm also running into this bug with Xen 4.4.1.
I've only tried Linux kernel 3.16.43, but as Dom0:
EDAC MC: Ver: 3.0.0
AMD64 EDAC driver v3.4.0
EDAC amd64: DRAM ECC enabled.
EDAC amd64: NB MCE bank disabled, set MSR 0x0000017b[4] on node 0 to enable.
EDAC amd64: ECC disabled in the BIOS or no ECC
2020 Sep 22
2
[PATCH] debian/scripts: Optimize scripts
Fewer fork()s and execve()s quickly add up to significant savings. I'm
concerned Debian is slowly headed towards recreating SunOS^WSolaris
5.7^W2.7^W7 and the layers and layers of scripts which killed
performance.
As these runtime scripts are heavily used, avoid all uses of external
programs by them.
Signed-off-by: Elliott Mitchell <ehem+debian at m5p.com>
---
The gains from this
2024 Feb 19
5
Looping
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]]
2017 Aug 02
1
Looping Through QuantMod Objects
Dear R Helpers,
I have run into a problem trying to perform a number of actions on a set
of quantmod data objects through a loop and I am hoping that this is an
easy problem for someone else as opposed to very difficult for me.
The example task is to get the first three objects of the quarterly
balance sheet for a number of companies from the getFinancials object and
put them together into a
2013 Mar 05
2
multiple plots and looping assistance requested
Hi all, I have a couple of questions.
1) Is there a more effective way to remove the following pattern
(patternrm) from the station_id_Timeseries (see below)
patternrm <- c(_2000_4_OND, _2001_1_JFM, _2001_2_AMJ, _2001_3_JAS,
_2001_4_OND, _2002_1_JFM, _2002_2_AMJ, _2002_3_JAS, _2002_4_OND,
_2003_1_JFM, _2003_2_AMJ, _2003_3_JAS, _2003_4_OND, _2004_1_JFM,
_2004_2_AMJ, _2004_3_JAS, _2000_4_OND) #
2017 May 16
3
Bug#810964: [Xen-devel] [BUG] EDAC infomation partially missing
On Mon, May 15, 2017 at 02:02:53AM -0600, Jan Beulich wrote:
> >>> On 14.05.17 at 00:36, <ehem+debian at m5p.com> wrote:
> > I haven't yet done as much experimentation as Andreas Pflug has, but I
> > can confirm I'm also running into this bug with Xen 4.4.1.
> >
> > I've only tried Linux kernel 3.16.43, but as Dom0:
> >
> > EDAC
2016 Jan 14
6
Bug#810964: only partial EDAC information with Xen
Package: xen-hypervisor-4.4-amd64
Version: 4.4.1-9+deb8u3
Debian 8.2 installed on a supermicro H8SGL Board, AMD 6128 with 4x4GB
ECC RAM.
When booting the plain kernel (stock Jessie 3.16 or backport 4.1 or
4.3), both memory controllers (mc0 and mc1) appear under
/sys/devices/system/edac/mc with two csrow* each as expected. Same
happens, when booted with Xen 4.1.4-3+deb7u1.
When booted with Xen
2021 May 13
9
Bug#988477: xen-hypervisor-4.14-amd64: xen dmesg shows (XEN) AMD-Vi: IO_PAGE_FAULT on sata pci device
Package: src:xen
Version: 4.14.1+11-gb0b734a8b3-1
Severity: critical
Justification: causes serious data loss
X-Debbugs-Cc: debianbts at virtualzone.hu
Dear Maintainer,
after a clean install of bullseye/testing the xen dmesg shows the following message:
(XEN) AMD-Vi: IO_PAGE_FAULT: 0000:01:00.1 d0 addr fffffffdf8000000 flags 0x8 I
this is the sata device:
01:00.1 SATA controller: Advanced Micro
2010 Jun 25
1
Confused: Looping in dataframes
Hey,
I have a data frame x which consists of say 10 vectors. I essentially want
to find out the best fit exponential smoothing for each of the vectors.
The problem while I'm getting results when i say
> lapply(x,ets)
I am getting an error when I say
>> myprint
function(x)
{
for(i in 1:length(x))
{
ets(x[i],model="AZZ",opt.crit=c("amse"))
}
}
The error message is
2017 Aug 21
3
Help Required in looping visuals
Hi Team ,
I have a requirement of building set of panels in which each panel has multiple visuals based on single set of dataset values and this thing is repeated for other set of values as well.
For this requirement , I am trying to use a for loop to create visuals and panel for each set of values ( like first panel should be for first set of dataset values and so on) . Do we have any available
2012 Jul 29
4
R- Help (looping)
Hi,
I'm Wellington from Brazil and I have the following issue:
I've been working on a project a for a while, and I'm having trouble in
using the loop (for)
I need to read a column (c1), and for each value of this column, I need to
check if it's within the control limits
So, I was trying to do this:
For (k in 1: c1)
If (c1< lcl1 | c1 > ucl1) {here I
2010 Mar 16
1
nested looping functions and dataframes
Hey All,
So, I am confused how exactly to use nesting loop functions in R to spit out
data frames. I've managed to create a working function for my data set that
generates a data frame for a given set of Year i and Location j; but how
would I do it for all Years and Locations?
Here is my working function:
test<-function(i,j){
a<-x[which(x$Year==i & x$Location==j),]