similar to: Unexpected behavior of extract (`[`) or sapply functions

Displaying 20 results from an estimated 11000 matches similar to: "Unexpected behavior of extract (`[`) or sapply functions"

2013 Apr 17
2
Problem with DateVisit-gives wrong year?
Hi I have the following factor of dates that I want to converted to Date class so I can extract the month > test.date [1] 14/05/2012 14/05/2012 14/05/2012 14/05/2012 14/05/2012 14/05/2012 [7] 14/05/2012 14/05/2012 14/05/2012 14/05/2012 201 Levels: 01/10/2012 01/11/2012 01/12/2012 02/07/2012 ... 28/09/2012 I use code below ntest.date<-as.Date(test.date,'%d/%m/%y') but the output
2008 Oct 15
1
Forecasting using ARIMAX
Dear R-helpers, I would appreicate if someone can help me on the transfer parameter in ARIMAX and also see what I am doing is correct. I am using ARIMAX with 2 Exogeneous Variables and 10 years data are as follows: DepVar Period, depVar, IndepVar1 Period, indepVar1, IndepVar2 Period, indepVar2 Jan 1998,708,Jan 1998,495,Jan 1998,245.490 Feb 1998,670,Feb 1998,421.25,Feb 1998,288.170 Mar
2007 May 10
3
how to control the sampling to make each sample unique
I have a dataset of 10000 records which I want to use to compare two prediction models. I split the records into test dataset (size = ntest) and training dataset (size = ntrain). Then I run the two models. Now I want to shuffle the data and rerun the models. I want many shuffles. I know that the following command sample ((1:10000), ntrain) can pick ntrain numbers from 1 to 10000. Then I just
2003 Apr 02
4
randomForests predict problem
Hello everybody, I'm testing the randomForest package in order to do some simulations and I get some trouble with the prediction of new values. The random forest computation is fine but each time I try to predict values with the newly created object, I get an error message. I thought I was because NA values in the dataframe, but I cleaned them and still got the same error. What am I
2011 Sep 29
1
virsh cannot list broken guest.
Hi, I am starting to learn using libvirt with kvm on CentOS 6. Just used this command to start a guest: virt-install -ntest -r1024 --vcpus=1 -c/var/lib/libvirt/images/CentOS-6.0-x86_64-netinstall.iso --os-type=linux --os-variant=rhel6 --disk vol=kvmguests/test --vnc -v --virt-type=kvm --check-cpu --prompt --arch=x86_64 Then I found out that I misconfigured vnc. And I do not know how to
2006 Dec 22
3
multiline system call
Hello, I am trying to call sendmail from within R via system(). As sendmail reads from STDIN, I need to pass a multiline input as an argument. E.g. (not working): system('sendmail -f xxx at swing.be -t yyy at swing.be\ntest\n.\n') I tried a lot of ways to type the EOL characters, but cannot get them work the right way. This leads to several problems. For instance, R waits for me to
2003 Jul 30
2
Comparing two regression slopes
Hello, I've written a simple (although probably overly roundabout) function to test whether two regression slope coefficients from two linear models on independent data sets are significantly different. I'm a bit concerned, because when I test it on simulated data with different sample sizes and variances, the function seems to be extremely sensitive both of these. I am wondering if
2008 Apr 13
2
Arrays and functions
Hi, I' am doing a stats project using R to work out the size of a t-test and wilcoxon test depending on the distribution and sample size. I just can't get it to work - I want to put my results from the function size() into an array.At the moment I keep getting the error message:Error in res[distribution, test, samplesize] <- results : subscript out of boundsCan anyone tell me where
2005 Jul 19
2
segfault with grid and null unit (PR#8014)
Full_Name: Jonathan Paisley Version: 2.1.1 OS: Mac OS X 10.4.2 Submission from: (NULL) (81.178.107.67) I was following an example from library/grid/doc/grid.pdf ("Introduction to grid") and had the following code, where I'd mis-typed 1,3 instead of 1,2 as the first arguments to grid.layout. Sourcing this code causes the R GUI to crash. I've enclosed a partial backtrace from
2016 Oct 17
2
Dict proxy client returning empty string instead of multiline string
> > > >>>>> On 10/16/2016 11:16 PM, Pierre Jaury wrote: > > > >>>>>> Hello, > > > >>>>>> > > > >>>>>> I am using a dict proxy for my sieve extdata plugin to access some > > > >>>>>> fields from an SQLite database (autoreply text and other > > >
2016 Oct 16
2
Dict proxy client returning empty string instead of multiline string
Hello, I am using a dict proxy for my sieve extdata plugin to access some fields from an SQLite database (autoreply text and other database-configured items). All tests are performed against version 2.2.25. $ dovecot --version 2.2.25 (7be1766) My configuration looks like: dict { sieve = sqlite:/etc/dovecot/pigeonhole-sieve.dict } [...] sieve_extdata_dict_uri = proxy::sieve I
2012 Feb 17
4
2.0.X -> 2.1 pitfalls?
Hi all, are there any pitfalls known for the migration from 2.0.18 to 2.1? Can I simply stop dovecot, make install and start again? --Frank Elsner
2011 May 05
1
Extraction of columns from two matrices
Hi, I have two matrices with 4885 cols and 36 cols respectively . I would like to extract these 36 columns from the bigger matrix, the column values are different but the column names would be the same.Hence based on the names I would like to perform my operation. So is there any way of extracting this info in an easy way. I have tried names,which,grep,subset none have worked. Could someone help
2016 Oct 17
2
Dict proxy client returning empty string instead of multiline string
Hi! This does sound like a bug, we'll have look. Aki On 17.10.2016 01:26, Pierre Jaury wrote: > I dived a little bit further into the rabbit hole, up to the point where > debugging has become unpracticle but I still haven't found the root > cause for sure. > > I read most of the code for "p_strdup" based on datastack memory pools > (which are used for
2024 Dec 11
2
aggregate produces results in unexpected format
I am trying to use the aggregate function to run a function, catsbydat2, that produces the mean, minimum, maximum, and number of observations of the values in a dataframe, inJan2Test, by levels of the dataframe variable MyDay. The output should be in the form of a dataframe. #my code: # This function should process a data frame and return a data frame # containing the mean, minimum, maximum, and
2015 Dec 17
1
array() ignores illegal non-list dimnames
Is there a reason that array() silently ignores dimnames that are not a list but matrix() gives an error? > str(matrix(11:14, 2, 2, dimnames=c("Rows","Cols"))) Error in matrix(11:14, 2, 2, dimnames = c("Rows", "Cols")) : 'dimnames' must be a list > str(array(11:14, dim=c(2, 2), dimnames=c("Rows","Cols"))) int
2016 Oct 17
2
Dict proxy client returning empty string instead of multiline string
Oh duh, it used datastack pool. Try again with the attached patch? Please remember to clear the previous one out before trying. Aki > > The trace is missing some symbols, I will debug tomorrow and see where > the call comes from exactly. > > Regards, > > > On 10/17/2016 06:23 PM, Aki Tuomi wrote: > > Hi! > > > > Looking at the code, I think the bug
2004 Sep 28
3
sapply behavior
Hi, I use sapply very frequently, but I have recently noticed a behavior of sapply which I don't understand and have never seen before. Basically, sapply returns what looks like a matrix, says it a matrix, and appears to let me do matrix things (like transpose). But it is also a list and behaves like a list when I subset it, not a vector (so I can't sort a row for instance). I
2010 Oct 06
1
replaces a matrix of "NA"s in an array with the previous matrix with numbers
Dear list, Does anyone know if there is a function that replaces a matrix of "NA"s in an array with the previous matrix with numbers? For example, I have an array ab <- array(dim=c(3,3,15),dimnames=list(rows=1:3,cols=1:3,dim=times)) . Select out put from the array is: , , dim = 0.478356969557745 cols rows 1 2 3 1 0.4921053 0 0.5078947 2 0.0000000 0
2005 Jun 26
0
Factor correlations in factanal
Dear R-devel list members, Ben Fairbank draw it to my attention that factanal() (in the stats package) doesn't report factor correlations for oblique rotations. Looking at the source, I see that factanal also doesn't save the factor-transformation (rotation) matrix from which these correlations can be computed. I've modified the source, attached below, so that the transformation