search for: test_data

Displaying 20 results from an estimated 23 matches for "test_data".

2017 Jul 28
2
R Programming help needed - Returning dataframes + 2 Variables dynamically
...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 <- data.frame(test_data) return(test_data) return(c(x,y)) } for ( i in 1:1) { test_data <- Logic_fn(c(x,y)) test_data[1] test_data[2] test_data } With Regards, Vijaya Kumar Regati Disclaimer: IMPORTANT NOTICE: This e-mail (including any attachments) are confi...
2017 Jul 28
4
R Programming help needed - Returning dataframes + 2 Variables dynamically
...mend reading up on how function constructs work. Two return statements within a function are redundant because the function will exit after the first return statement, and anything else just creates more ambiguity. If you want to return the x y variables as well, you should use a list like so, list(test_data, x, y) and then retrieve information from the list like this Boo[[1]]..... Finally i would also like to point out that you should note R's behaviour unless explicitly stated while calling the function is to assign the first argument to the first declared variable and the second to the second....
2017 Jul 28
0
R Programming help needed - Returning dataframes + 2 Variables dynamically
...e 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) test_data <- data.frame(test_data) return(list(x,y,test_data)) } for ( i in 1:1 ) { test_data <- Logic_fn(x,y) print("Returned Values :") print(x) print(y) } Wrong output : [1] "Passed Values" [1] 0 [1] 0 [1] "After addition :" [1] 1 [1] 1 [1]...
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 a...
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
...NU General Public License > +# along with this program; if not, write to the Free Software > +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. > + > +set -e > + > +$TEST_FUNCTIONS > +slow_test > +skip_if_skipped "$script" > + > +test_data=repository-testdata > +rm -rf $test_data > +mkdir $test_data > + > +# Make a copy of the Fedora image > +cp ../test-data/phony-guests/fedora.img $test_data > + > +# Create minimal index file > +cat > $test_data/index << EOF > +[fedora] > +file=fedora.img >...
2012 Nov 20
1
Removing columns that are na or constant
...a(.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 <- sample(1:nrow(x), testSize) train_data <- x[-test,] test_data <- x[test, -1] test_class <- x[test, 1] It is now possible that test_data or train_data contain columns that are constants, however as one dataset they did not. So the solution for me is to just re-run lines to remove all constants......not a problem, but is this normal? is this how I shou...
2012 Feb 15
1
Passing date as parameter while retrieving data from database using dbGetQuery
...roduce error with the above code, I am providing sample example as below with sqldf function using dataframe. date_tm <- as.Date(c('2010-11-01', '2011-11-01','2010-12-01', '2011-01-01', '2011-02-01')) x1 <- c(1,2,3,4,5) x2 <- c(100,200,300,400,500) test_data <- data.frame(x1,x2,date_tm) test_data start_dt <- as.Date('2011-01-01',format="%Y-%m-%d") #Passing as parameter end_dt <- as.Date('2011-02-31',format="%Y-%m-%d") #Passing as parameter library(sqldf) new_data <- sqldf("select * from test_da...
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 values are different > min(d2-d1) [1] -1.976152 > max(d2-d1) [1] 1.535222 However, if I do these on the training data: > d1=scale(training_data, center=TRUE, scale=FALSE) %...
2018 Jun 29
1
OPUS on cortex M4
...to make a simple example of opus_encode followed by and immediate opus_decode I do not get reasonable values compared to the input. I'm wondering if I'm somehow misunderstanding how the codec works. Could somebody tell me if my approach could work? int frame_size = 160; opus_int16 test_data_size = frame_size*channels*sizeof(opus_int16); opus_int32 max_data_bytes = 100; opus_int16 test_data[test_data_size]; opus_int16 *p_test_data = test_data; unsigned char encoded_buffer[max_data_bytes]; unsigned char *p_encoded_buffer = encoded_buffer; opus_int16 decoded_buff...
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 +
2017 Nov 13
0
[PATCH v12 3/3] New tool: virt-builder-repository
...ls. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + +set -e + +$TEST_FUNCTIONS +slow_test +skip_if_skipped "$script" + +test_data=repository-testdata +rm -rf $test_data +mkdir $test_data + +# Make a copy of the Fedora image +cp ../test-data/phony-guests/fedora.img $test_data + +# Create minimal index file +cat > $test_data/index << EOF +[fedora] +file=fedora.img +EOF + +# Run virt-builder-repository (no compression,...
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 Android<https://aka.ms/ghei36> [[alternative HTML version deleted]]
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
2018 Jun 02
3
Prediccion de series temporales con keras
...ilto:j.para.fernandez en hotmail.com>> escribi?: 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 Android<https://aka.ms/ghei36> [[alternative HTML version deleted]] _______________________________________________ R-help-es mailing list R-help-es en r-project.org&l...
2017 Oct 27
15
[PATCH v11 0/8] virt-builder-repository
Hi all, Here is the latest version of the series. Diffs to v10: * Make Index.arch a (string, string option) maybe and use it to guess arch at parse time * Compute the image size at parse time when the template flag is set and the value is missing. * Add virt-repository_main slow test * Other fixes from Richard's comments Cédric Bosdonnat (7): Ignore builder/*.out and *.img
2006 Feb 15
0
Wild ideas about fixtures
...ipt before RoR switches to test modus. Maybe the first thing wasn''t such a bad thing, because I reuse the code which is written for rake... I could just copy paste it to the helper ... but it''s already somewhere so it sounds like duplication. Anybody on automating creation of test_data / fixtures from the development database ? Kind Regards, Jeroen van Doorn
2010 Feb 04
5
export test results to csv
...- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: output.txt URL: <https://stat.ethz.ch/pipermail/r-help/attachments/20100204/a1b8bb1b/attachment.txt> -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: test_data.txt URL: <https://stat.ethz.ch/pipermail/r-help/attachments/20100204/a1b8bb1b/attachment-0001.txt>
2018 Jul 01
1
OPUS on cortex M4 (Nicolas Ehrenberg)
...h>, "opus at xiph.org" <opus at xiph.org> Subject: Re: [opus] OPUS on cortex M4 Message-ID: <4ad369bd-a04a-de38-67fe-855565891973 at xiph.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Ehrenberg Nicolas wrote: > for(uint16_t i = 0; i < test_data_size; i++) > { > test_data[i] = 100; > } > > [snip] > > The decoded values start out at 0, go to -16 up, then up to 135 and then > slowly down to the 17 (see attached file). > Furthermore, I do not see much of a change if I increase the complexity. You'...
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