similar to: Removing columns that are na or constant

Displaying 20 results from an estimated 200 matches similar to: "Removing columns that are na or constant"

2017 Jul 28
2
R Programming help needed - Returning dataframes + 2 Variables dynamically
Hi, Can someone please help me on below issue I am facing : I am trying to play with returning a dataframe+2 variables using a fn. But facing an issue : Error in Logic_fn(c(x, y)) : argument "y" is missing, with no default This is the code I am using : x <- 0 y <- 0 Logic_fn <- function(x,y){ x <- x + 1 y < y + 1 test_data <- rbind(x,y) test_data <-
2017 Jul 28
1
R Programming help needed - Returning dataframes + 2 Variables dynamically
The returned values are in the list you assign to test_data, the original x and y are not modified, i.e the returned value for x will be test_data[[1]] and for y will be test_data[[2]]. Using the same variable names in the function and test is perhaps what is leading to confusion. > On 28 Jul 2017, at 09:13, Vijaya Kumar Regati <VijayaKumar.Regati at m3bi.com> wrote: > > Hi, >
2017 Jul 28
0
R Programming help needed - Returning dataframes + 2 Variables dynamically
Hi, That was very useful information. Thanks. But still I am not able to get the desired output with updated code. Kindly help if you have any further thoughts ... Updated code : x <- 0 y <- 0 Logic_fn <- function(x,y){ print("Passed Values") print(x) print(y) x <- x + 1 y <- y + 1 print("After addition :") print(x) print(y) test_data <- rbind(x,y)
2017 Jul 28
4
R Programming help needed - Returning dataframes + 2 Variables dynamically
c() is used for constructing vectors. Or in other words using the method c(x,y) provides a vector of length 2 (hopefully). Therefore, you are pushing a single vector to your function and not two arguments as you want. It should be Logic_fn(x,y) not Logic_fn(c(x,y)). Furthermore, i would recommend reading up on how function constructs work. Two return statements within a function are redundant
2009 Oct 23
1
Data format for KSVM
Hi, I have a process using svm from the e1071 library. it works. I want to try using the KSVM library instead. The same data used wiht e1071 gives me an error with KSVM. My data is a data.frame. sample code: svm_formula <- formula(y ~ a + B + C) svm_model <- ksvm(formula, data=train_data, type="C-svc", kernel="rbfdot", C=1) I get the following error:
2012 Feb 15
1
Passing date as parameter while retrieving data from database using dbGetQuery
Hi All, This might be simple question, I need to retrive data for modelling from the databases. Eveytime date values changes so I countnot fix date value in the code, it is required to pass as parameter. When I pass the date as parameter, it throws error. (ERROR: column "start_dt" does not exist Position: 285) My script is as below, please guide me where am I going wrong? All parameters
2006 Feb 27
1
question about Principal Component Analysis in R?
Hi all, I am wondering in R, suppose I did the principal component analysis on training data set and obtain the rotation matrix, via: > pca=prcomp(training_data, center=TRUE, scale=FALSE, retx=TRUE); Then I want to rotate the test data set using the > d1=scale(test_data, center=TRUE, scale=FALSE) %*% pca$rotation; > d2=predict(pca, test_data, center=TRUE, scale=FALSE); these two
2009 Aug 02
2
Strange column shifting with read.table
Hi, I am reading in a dataframe from a CSV file. It has 70 columns. I do not have any kind of unique "row id". rawdata <- read.table("r_work/train_data.csv", header=T, sep=",", na.strings=0) When training an svm, I keep getting an error So, as an experiment, I wrote the data back out to a new file so that I could see what the svm function sees.
2011 Jun 16
1
Question about R.oo package
Dear R.oo package users, while testing some functionality of the R.oo, I found that during the first construction of a object from a class, the constructor is twice called, but only one object is finalized. In all subsequent creation processes, the constructor is (expectedly) called once. Here some example code: library(R.oo) setConstructorS3("Test_class",function(val) {
2018 Jun 29
1
OPUS on cortex M4
Hi everybody I wrote a couple of months ago about implementing the opus codec on a DK52 from Nordic (nrf52832 MCU, Cortex M4). In the meantime I got a bit further and would again like to ask some questions. My settings: I included all the opus files into my project (opus-1.2.1) Defined: FIXED POINT, VAR_ARRAYS, DISABLE FLOAT API, OPUS_BUILD, CELT_MODE_ONLY I am able to allocate enough memory
2009 Nov 26
2
Puppet+Foreman: class into module couldn't apply on nodes
Hello, I try config puppet with foreman frontend. Into puppetmasterd I create modules "test" and create init.pp: # Create "/tmp/testfile" if it doesn''t exist. class test_class { file { "/tmp/testfile": ensure => present, mode => 644, owner => root, group => root } } Configure nodes in site.pp and import
2012 May 11
3
Calculating all possible ratios
I have a data matrix with genes as columns and samples as rows. I want to create all possible gene ratios.Is there an elegant and fast way to do it in R and write it to a dataframe? Thanks for any help. Som. -- View this message in context: http://r.789695.n4.nabble.com/Calculating-all-possible-ratios-tp4627405.html Sent from the R help mailing list archive at Nabble.com. [[alternative HTML
2018 Jun 02
2
Prediccion de series temporales con keras
Buenas Alguien sabe como se hacen las predicciones de las series temporslea usando keras? Baaado en esto: https://tensorflow.rstudio.com/blog/time-series-forecasting-with-recurrent-neural-networks.html He intentado hacer un predict_generator(test_data) pero siempre me devuelve el error de que el array no coincid con las dimensiones Gracias!! Obtener Outlook para
2009 Sep 17
2
QQ plotting of various distributions...
Hello! I am trying with this question again: I would like to test few distributional assumptions for some behavioral response data. There are few theories about true distribution of those data, like: normal, lognormal, gamma, ex-Gaussian (exponential-Gaussian), Wald (inverse Gaussian) etc. The best way would be via qq-plot, to show to students differences. First two are trivial: qqnorm(dat$X)
2017 Aug 08
1
[PATCH] drm/virtio: make drm_fb_helper_funcs const
Make these structures const as they are only passed to the function drm_fb_helper_prepare and the corresponding argument is of type const. Done using Coccinelle @match disable optional_qualifier@ identifier s; @@ static struct drm_fb_helper_funcs s = {...}; @ref@ position p; identifier match.s; @@ s at p @good1@ identifier match.s; expression e1,e2; position ref.p; @@
2017 Aug 08
1
[PATCH] drm/virtio: make drm_fb_helper_funcs const
Make these structures const as they are only passed to the function drm_fb_helper_prepare and the corresponding argument is of type const. Done using Coccinelle @match disable optional_qualifier@ identifier s; @@ static struct drm_fb_helper_funcs s = {...}; @ref@ position p; identifier match.s; @@ s at p @good1@ identifier match.s; expression e1,e2; position ref.p; @@
2017 Nov 14
1
Re: [PATCH v12 3/3] New tool: virt-builder-repository
On Mon, Nov 13, 2017 at 02:56:12PM +0100, Cédric Bosdonnat wrote: > +let checksums_get_sha512 = function > + | None -> None > + | Some csums -> > + try > + Some (List.find ( > + function > + | Checksums.SHA512 _ -> true > + | _ -> false > + ) csums) > + with Not_found -> None This is still a bit
2009 Dec 03
1
Could not retrieve catalog
Hello all, I''m running puppet for the first ime. I''ve finished the install but I''m stuck at the certificate part. The puppet master (0.24.4-3) is running on Ubuntu Lenny and the puppet client (0.24.8-4.el5) is running on CentOS 5.3. After the install, from the client side, I''ve run: puppetd --server puppetmaster.domain.com --waitforcert 60 --test On the
2018 Jun 02
3
Prediccion de series temporales con keras
Es justo ese ejemplo el que estoy mirando, pero no sale la prediccion He probado a cambiar la funcion generadora, haciendo que devuelva como lista solo los input, pero sigue devolviendo error: Error in py_call_impl(callable, dots$args, dots$keywords) : ValueError: Error when checking model : the list of Numpy arrays that you are passing to your model is not the size the model expected.
2017 Nov 13
6
[PATCH v12 0/3] virt-builder-repository tool
Hi there! Here is the latest version of the series including Richard's comments. I also reworked the repository_main.ml code to avoid setting an empty entry if not found. Cédric Bosdonnat (3): builder: change arch type to distinguish guesses builder: add a template parameter to get_index New tool: virt-builder-repository .gitignore | 4 +