Hi Paul,
Based on my guess that all values have been normalized, I would say:
mat<-(matrix(runif(16,-5,5),4))
df<-as.data.frame(mat)
df[abs(df) < 3]<-NA
df
V1 V2 V3V4
1 NA 4.675699 3.166625NA
2 NA NA NA 3.463660
3 4.288831 NA
Hello,
Something like this?
First normalize the data.
Then a apply loop creates a logical matrix giving which numbers are in
the range -3 to 3.
If they are all TRUE then their sum by rows is equal to the number of
columns. This creates a logical index i.
Use that index i to subset the scaled
Dear friends,
I have a dataframe which every single (i,j) entry (i standing for ith row,
j for jth column) has been normalized (converted to z-scores).
Now I want to filter or subset the dataframe so that I only end up with a a
dataframe containing only entries greater than -3 or less than 3.
Hello,
My code seems to work with your data, except that the first column is
not to be scaled.
# file names
xlsfile <- file.path("~/dados", "trainFeatures42k.xls")
csvfile <- file.path("~/dados", "Normalized_Data.csv")
# read in the data files
df1 <- readxl::read_excel(xlsfile, col_names =
This is trivial, so perhaps there is a miscommunication. How do you want to
handle values outside your desired range? I would simply change them to NA
(see below), but perhaps you have something else in mind that you need to
describe more explicitly. Anyway, below is a simple example of what I
I am not sure if this is appropriate here, my apologies if not. I have
used R for 20 years now and need help with non-linear regression analysis
over 100's of different frequencies and my data has exceeded by R program
capabilities.
My company would provide the contract.
keith
M. Keith Cox,
Paul,
I read through the public replies you received and clearly some of us were not
too clear on what you asked. Your subject line was not helpful as my first
thought was that you wanted a single column examined for two conditions, as in
EITHER less than 3 standard deviations above the mean
NO ME RESULTÓ
gRACIAS DE TODOS MODOS
El 9/5/22, Juan Abasolo escribió:
> Seguro que te lo saben resolver muchísimo más elegante.
> Pero si te sirve para desatascarte, acá mi ejercicio
>
> Suerte
>
> library(tidyverse)
> dtk <- read.csv('data/raw/presiones.csv',
> sep = ',', dec
ENVEZ DE SUM USÉ MEDIAN QUE ES LO QUE ME CONVIENE, GRACIAS!!
library(readxl)
ta <- read_excel("C:/Users/betan/Desktop/presiones.xlsx")
attach(ta)
'
ta %>%
pivot_longer(cols = names(ta)) %>%
group_by(name) %>%
summarise(median(value)) %>%
ungroup() %>%
mutate( valor = `median(value)`)
9 matches
Mail list logo