similar to: R Programming help needed - Returning dataframes + 2 Variables dynamically

Displaying 20 results from an estimated 600 matches similar to: "R Programming help needed - Returning dataframes + 2 Variables dynamically"

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
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, >
2012 Nov 20
1
Removing columns that are na or constant
I have a dataset that has many columns which are NA or constant, and so I remove them like so: same <- sapply(dataset, function(.col){ all(is.na(.col)) || all(.col[1L] == .col) }) dataset <- dataset[!same] This works GREAT (thanks to the r-users list archive I found this) however, then when I do my data sampling like so: testSize <- floor(nrow(x) * 10/100) test <-
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
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
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 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
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 +
2018 Jun 30
4
Developed an issue with Samba File Server integrated with Samba-AD
Hi, We have been using Samba File Server (Version 4.3.11 Ubuntu 14.04 LTS) for quite sometime now. We recently installed Samba-AD (Samba AD Version 4.7.6) and made the file server a member of the Domain. Everything was fine till around 11:15 am yesterday. We just added one more share folder and gave access to three users and restarted Samba File Server services - smbd, nmbd and winbindd -
2017 Nov 13
0
[PATCH v12 3/3] New tool: virt-builder-repository
virt-builder-repository allows users to easily create or update a virt-builder source repository out of disk images. The tool can be run in either interactive or automated mode. --- .gitignore | 4 + builder/Makefile.am | 87 ++++- builder/repository_main.ml | 621 ++++++++++++++++++++++++++++++++ builder/test-docs.sh
2015 Sep 21
1
Reg: Virsh managedsave Failing
Hi All, We are trying to do "virsh managedsave" on a VM but it is failing with the following error. libvirtError: operation failed: domain save job: unexpectedly failed^M libvirt and qemu versions are as follows: libvirt-1.1.1-29.el7.x86_64 qemu-kvm-1.5.3-60.el7_0.11.x86_64 VM is provided with a small pxe image such that it pxe boots from a remote server. VM doesn't have any
2017 Nov 21
5
[PATCH v13 0/3] virt-builder-repository
Hey there, Here is an update of the series. The changes: * Incorporate Richard's comments. Left out the with_openfile one since that leads to a double close. * Change the ask option return type to string (removing the option) since if the use doesn't input anything we're using the default, and the default is now a mandatory parameter. * Make sure there are items in the
2012 Sep 12
8
Round off method in 1.8.7
Hi all i am trying to use round method if have a value 2.08 i want it as 2.1 and it worked in 1.9.2 but not in 1.8.7 is there any other way of doing it. USING 1.9.2 1.9.2p320 :001 > 2.08.round(1) => 2.1 1.9.2p320 :002 > 2.04.round(1) => 2.0 USING 1.8.7 irb(main):001:0> 2.08.round => 2 irb(main):002:0> 2.08.round(1) ArgumentError: wrong number of arguments (1 for
2010 Apr 01
1
Factorial regression with multiple features: how to remove non-significant features?
Hello all, I am trying to do factorial regression using lm() like this (example): model<-lm(y ~ x1 + x2 + x3 + x4 + x1*x2*x3*x4) The final term 'x1*x2*x3*x4' adds all possible interactions between explanatory variables to the model. i.e. x1:x2, x1:x2:x3, etc, etc. Now, the issue is that some of the interactions are significant and some are not. I can manually remove
2010 Feb 04
5
export test results to csv
Hi everybody! I would like to export the results of a test statistic in a *.csv file, but get an error. The code is below. The data are attached as .txt with tab as separator. I tried to get a sample dataset, but for some reason it didn't work, so please excuse the length of the file. I also attached a txt with the output (copy/paste) in case that helps. ---- > library(WRS) >
2005 Sep 26
1
Smart Boot Manager question
Hi: Thank you very much for creating this very useful program. I downloaded the DOS version because there was a suggestion in th isolinux website. I was not able to detect the cd-rom on my pentium II computer with Award BIOS 4.51 v 1.10. I tried to set the IDE i/o address but I am not sure where to get the i/o address information. I used the i/o address in the Win98 device manager IDE