Related
username I have a dataframe with this format: DF1 <- DF0[i,6:12] (DF0 is the original data frame I read from)
The resulting DF1 has the following names: DF1:
home - train -bus -car .. - male - female
1 3 0 0 1
What I want to
username I have a dataframe with this format: DF1 <- DF0[i,6:12] (DF0 is the original data frame I read from)
The resulting DF1 has the following names: DF1:
home - train -bus -car .. - male - female
1 3 0 0 1
What I want to
Claire I am developing a Shiny application. Part of the user interface involves using dropdown menus, checkboxes, etc. to select which of the columns of data to plot. I use grepl() with user input to shrink the large dataframe to the last column to plot. Speci
Graeme Prentice-Mott I'm trying to join a bunch of dataframes together and they all have the same information. But some column names are missing and some dataframes have extra columns. However, they all follow the same order for the columns they do have. I wan
Graeme Prentice-Mott I'm trying to join a bunch of dataframes together and they all have the same information. But some column names are missing and some dataframes have extra columns. However, they all follow the same order for the columns they do have. I wan
Christian Skyot I have the following code . standin1<-cbind(c("AAPL","JPM"), c("MSFT","AMZN"))
wantedstocks<-unique(c(standin1))
wantedstockprices<-tq_get(wantedstocks,"stock.prices", from = "2010-01-01", to = "2012-01-01")
prices_tbl1<-split(wantedstockprices
basil I have a dataframe with NAs columns that I use replace_na. The problem is that these column names may change in the future, so I want to put these column names in a vector and then use that vector in the replace_nafunction . I don't want to change the wh
Ash I have two datasets: A sort of. The data frame looks like this: SpeciesA SpeciesB SpeciesC SpeciesD SpeciesE SpeciesY SpeciesZ
Site1 1 0 4 6 2 5 2
Site2 1 0 4 6
Ash I have two datasets: A sort of. The data frame looks like this: SpeciesA SpeciesB SpeciesC SpeciesD SpeciesE SpeciesY SpeciesZ
Site1 1 0 4 6 2 5 2
Site2 1 0 4 6
Ash I have two datasets: A sort of. The data frame looks like this: SpeciesA SpeciesB SpeciesC SpeciesD SpeciesE SpeciesY SpeciesZ
Site1 1 0 4 6 2 5 2
Site2 1 0 4 6
Ash I have two datasets: A sort of. The data frame looks like this: SpeciesA SpeciesB SpeciesC SpeciesD SpeciesE SpeciesY SpeciesZ
Site1 1 0 4 6 2 5 2
Site2 1 0 4 6
Ash I have two datasets: A sort of. The data frame looks like this: SpeciesA SpeciesB SpeciesC SpeciesD SpeciesE SpeciesY SpeciesZ
Site1 1 0 4 6 2 5 2
Site2 1 0 4 6
Neil perch It's of course easy, but for me I can't find the correct syntax. I want to keep all the "ID_" columns regardless of the number of columns and appended numbers and keep the other columns by constant name. A command similar to the following doesn't wo
Neil perch It's of course easy, but for me I can't find the correct syntax. I want to keep all the "ID_" columns regardless of the number of columns and appended numbers and keep the other columns by constant name. A command similar to the following doesn't wo
Neil perch It's of course easy, but for me I can't find the correct syntax. I want to keep all the "ID_" columns regardless of the number of columns and appended numbers and keep the other columns by constant name. A command similar to the following doesn't wo
LinearLeopard: I am trying to print or get a list of column names with missing values. E.g data1 data2 data3
1 3 3
2 NaN 5
3 4 NaN
I want to get ['data2', 'data3']. I wrote the following code: print('\n'.join(map(
lambda x :
Andy Robertson I'm creating a data table in R that has sub-rows, manually defined column names and a few columns hidden. According to the example provided in the DT manual https://rstudio.github.io/DT/002-rowdetails.html , this seems fairly straightforward (ie
Linear Panther I am trying to print or get a list of column names with missing values. E.g data1 data2 data3
1 3 3
2 NaN 5
3 4 NaN
I want to get ['data2', 'data3']. I wrote the following code: print('\n'.join(map(
lambda x :
Andy Robertson I'm creating a data table in R that has sub-rows, manually defined column names and a few columns hidden. According to the example provided in the DT manual https://rstudio.github.io/DT/002-rowdetails.html , this seems fairly straightforward (ie
bib When writing the pandas mainTable dataframe mainTable.csv, but after writing to the file, the column names indexare missing . Why is this happening because I have specified index=True? mainTable.to_csv(r'/Users/myuser/Completed/mainTable.csv',index=True)
m
LinearLeopard: I am trying to print or get a list of column names with missing values. E.g data1 data2 data3
1 3 3
2 NaN 5
3 4 NaN
I want to get ['data2', 'data3']. I wrote the following code: print('\n'.join(map(
lambda x :
Colin Lets say I have a dataframe that looks like this ca01<- c(1:10)
ca02<- c(2:11)
ca03<- c(3:12)
stuff.1<- rep('test',10)
other<- rep(9,10)
data<- data.frame(ca01,ca02,ca03,stuff.1,other)
Then, I create a vector containing the column names samps<- colname
weight I have a 4x4 matrix and I want to identify elements in this matrix that are equal to a certain value (eg 1). I would like to save the indices of these elements along with the column and row names into two separate vectors. In the end I want to write all
rise I have a dataframe with columns representing species. Species relatedness is encoded in the suffix of the column name: Ac_1234_ AnyString The string after the second underscore (_) indicates the affiliation of the species. I want to plot some networks bas
Colin Lets say I have a dataframe that looks like this ca01<- c(1:10)
ca02<- c(2:11)
ca03<- c(3:12)
stuff.1<- rep('test',10)
other<- rep(9,10)
data<- data.frame(ca01,ca02,ca03,stuff.1,other)
Then, I create a vector containing the column names samps<- colname
Skampak I want to paste the values from the vector into the column names of the dataframe. Suppose the file has 4 columns and the tmp2 vector has 4 values. The for loop works just fine (the new colname is the value of tmp and the value of tmp2 together), but I
Noruzian I have a data.framephone DATA. Using BASE R , I would like to know how to delete any variable DATAnamed any of the following : ar = c("out", "Name", "mdif" , "stder" , "mpre")? Currently, I use, DATA[ , !names(DATA) %in% ar]but while this removes unwa
kd1978 This should be simple, but I'm struggling to get it to work. I currently have a vector of column names: columns <- c('product1', 'product2', 'product3', 'support4')
I'm now trying to use dplyr in a for loop to change some columns, but I'm struggling to
89_Simple set.seed(123)
dat <-
data.frame(year_ref = 2000:2004,
www_val1 = sample(5),
www_val2 = sample(5),
www_val3 = sample(5),
sat_val1 = sample(5),
sat_val2 = sample(5),