Questions tagged [mutated]

77 questions
1
vote
2 answers

My Object scoped from a require is being mutated externally, yet I am cloning it

I have a javascript file (lets call it newconfig.js) that is including a module (of type Object) through a require() action in a config.js file: Consider core.js to be: module.exports = { configuration: { showLanguageSelector: false …
Chris West
  • 55
  • 3
1
vote
2 answers

create(mutate) column with a condition of another one

I have this data COL AABC1 AAAABD2 AAAAAABF3 I would like to make a certain column like this: COL NEW_COL AABC1 T1 AAAABD2 T2 AAAAAABF3 T3 If COL contains 'BC', NEW_COL will be…
jhyeon
  • 456
  • 4
  • 14
1
vote
1 answer

React NPM packages to prevent, search and monitor places where state is mutated

Do you know any worth recommending npm packages (for the DEV environment needs) to find spots in React app where redux store state is mutated ? Currently I'm using Redux Freeze State package but unfortunatelly the indicated package is outdated, not…
ELing
  • 249
  • 6
  • 19
1
vote
1 answer

When trying to call an object with get() within group_by and mutate, it brings up the entire object and not the grouped object. How do I fix this?

Here is my code: data(iris) spec<-names(iris[1:4]) iris$Size<-factor(ifelse(iris$Sepal.Length>5,"A","B")) for(i in spec){ attach(iris) output<-iris %>% group_by(Size)%>% mutate( out=mean(get(i))) detach(iris) } The for loop is…
Matt
  • 23
  • 3
1
vote
2 answers

Send email with PHP script -> How to display mutated vowels?

I use this php script to send an email. It works well, but german mutated vowels (ö,ä,ü, etc) are not displayed correctly. Any hints how to change that?
anon
1
vote
1 answer

Weird behavior of mutate function from dplyr package in R

I am working on a set with dimensions dim(data) [1] 419612 2 Where second column look more-or-lesslike this: > unique(data[1:50,"topics"]) [1]…
Marcin
  • 7,834
  • 8
  • 52
  • 99
1
vote
2 answers

I don't know why I have to call valueHasMutated on this knockout observable array

I'm using Durandal framework. I have a logger module that displays and stores messages displayed to the user. The messages are stored in an observable array using obsArray.push(...). var logMessages = ko.observableArray(); logMessages.push({ …
mwill
  • 424
  • 7
  • 21
1
vote
1 answer

ListView element background - resource mutable()

I have problem with my ListView. I want to set every second element in listView to have its background transparent. I use following code: public View getView(int position, View convertView, ViewGroup parent) { View v = convertView; …
Marek
  • 3,935
  • 10
  • 46
  • 70
1
vote
2 answers

Unsure why dictionary is mutating

Doing a self-study of Python via MIT Open Courseware, and ran into a problem with this bit of code below. When I run this function either alone or within another function, it mutates the originally passed value 'hand', and I am not sure why. I set…
0
votes
2 answers

Create new data frame with values from old data frame

I have a long data frame that looks like this: Product Price Decision Sum Food 1 yes 39 Food 1 no 234 Food 2 yes 1312 Food 2 no 3123 Clothes 1 yes 323 Clothes 1 no 232 Clothes 3 yes 3 Clothes 3 no 434 I want a code that…
cristi
  • 31
  • 1
0
votes
1 answer

In dplyr, how to use a value in a column to specify another column to index

I have data in the form of a list of objects (settings from our analysis machine). Some objects in the list are times, stored as a list containing hours, minutes and seconds. I then have a 'directory', which contains the names of the objects in the…
Mike
  • 921
  • 7
  • 26
0
votes
1 answer

How to work with two data frames that interact with each other inside one function in R?

I get the below output when I run my custom function runLabel() against starting data frame myDF, generated via the code immediately beneath. The code generates two data frames: Label and selGrpCode, and Label needs to be manipulated by values in…
Village.Idyot
  • 1,359
  • 2
  • 8
0
votes
0 answers

R: Add a column to dateframe using 2 dataframes of unequal length

The goal is to mutate a new column to a df1, by matching a column in both df1 and df2, and returning the matching row value for another column (col5) in df2, [AND ONLY THE VALUE OF THAT COLUMN] which will be added to df1. df1 <-…
ambergris
  • 17
  • 4
0
votes
2 answers

mutating react state delete class method

I have a class instance in my react state and it's like below: class Room { name; participant; constructor(name) { this.name = name; this.participant = { screensharing: false, }; } sendReinvite() { …
0
votes
0 answers

R: create a new column based on conditions from subsequent ROWS

I am attempting to make a new column that is based on the values in the following 3 rows but cant seem to get the condition/format to work ? I have a dataframe (hh01) with the following columns ([#] = the column number): ... [16]temp_avg,…
htee
  • 1
  • 2