similar to: Simultaneously adding rows and columns by '[<-.data.frame' may fail

Displaying 20 results from an estimated 4000 matches similar to: "Simultaneously adding rows and columns by '[<-.data.frame' may fail"

2000 Nov 25
2
assigning to data frames with whole columns of NAs
I suppose this could be described as a feature (it seems to be similar in S-Plus), but it looks to me more like a bug. Why can't the assignment below to a row of "emptyframe" (or "anotherframe") be made? This with R --vanilla (version info below). Regards -- David David Firth Phone +44 1865 278544 Nuffield College Fax +44 1865
2005 Oct 26
1
unexpected '[<-.data.frame' result
Is this a bug? If not, I am curious to know why '[<-.data.frame' was designed to yield a.frame$y != a.frame$z rather than refusing to carry out the operation at all. > a.frame <- data.frame( x=letters[1:5] ) > a.frame[ 2:5, "y" ] <- letters[2:5] > a.frame[[ "z" ]][ 2:5 ] <- letters[2:5] > a.frame x y z 1 a b <NA> 2 b c
2004 Jun 29
0
gambling problem
Hi all i have an interesting project that i have been working on. i intended to set this as a first year programming problem but then changed my mind since i thought that it might be too difficult for them to program. the problem is as follows: You have been approached by a local casino in order to investigate the performance of one of their slot machines. The slot machine
2007 Feb 23
4
using "integrate" in a function definition
Dear list members, I'm quite new to R, and though I tried to find the answer to my probably very basic question through the available resources (website, mailing list archives, docs, google), I've not found it. If I try to use the "integrate" function from within my own functions, my functions seem to misbehave in some contexts. The following example is a bit silly, but
2020 Oct 29
0
dovecot quota-warning detection mail
Very good. See https://doc.dovecot.org/configuration_manual/authentication/passwd_file/ You can add the "user" field as an "extra field" In users.auth, just add in the end "user=bbbb-ccc at ddd.example.com" to match the respective entry in /etc/dovecot/users Good luck! On 10/29/20 2:02 PM, ?? ?? wrote: > OK. "passdb/userdb" Setting part > > $
2020 Oct 29
2
dovecot quota-warning detection mail
OK. "passdb/userdb" Setting part $ dovecot -n (Excerpt from change) ---------------------------------------------------------------------------- --------------------- passdb { args = scheme=CRYPT username_format=%u /etc/dovecot/users.auth driver = passwd-file } userdb { args = username_format=%u /etc/dovecot/users.auth driver = passwd-file } protocol lmtp { info_log_path =
2004 Nov 28
0
Re: [R-sig-finance] syntax for a loop
I don't think I understand you entirely, but here are a couple things. You need to shorten the loop so you don't run off the end. You basically just write the code as you've stated it except that "and" is && for single values and & for vectors You don't say what should happen if the test is not true. You can probably use "ifelse" instead of a
2020 Aug 11
2
clarifying the handling of responses for virtio-rpmb
Hi, The specification lists a number of commands that have responses: The operation of a virtio RPMB device is driven by the requests placed on the virtqueue. The type of request can be program key (VIRTIO_RPMB_REQ_PROGRAM_KEY), get write counter (VIRTIO_RPMB_REQ_GET_WRITE_COUNTER), write (VIRTIO_RPMB_REQ_DATA_WRITE), and read (VIRTIO_RPMB_REQ_DATA_READ). A program key or write
2020 Sep 11
0
[virtio-dev] Re: clarifying the handling of responses for virtio-rpmb
Harald Mommer <hmo at opensynergy.com> writes: > Hello, > > I had my hands in a virtio RPMB device implementation the last few > weeks. During the development process I had to apply some patches to the > virtio RPMB driver: > > * Change the device id from 0xFFFF to 28 > > * (Add some debug facilities. Needed to see the frames. Got first no > request
2009 Mar 22
0
all.equal is hard to use
Hi, I have extensive programming experience (Winodws, Unix, scripting, compiled languages, you name it) but new to R. I found that it is quite hard to interpret the results returned by all.equal (base). The main problem is that when attributes are compared, they are sorted in attr.all.equal but in the result, the index of diff component is from the sorted list not the original list. I think that
2007 Mar 08
1
Searching and deleting elements of list
Hi, I have a problem. Please, look at example and try to help me!! > A<-c("aaa","bbb","ccc","ddd","eee") > B<-c("vvv","ooo","aaa","eee","zzz","bbb") > C<-c("sss","jjj","ppp","ddd") > D<-c("bbb","ccc")
2009 Aug 12
1
inserting into data frame gives "invalid factor level, NAs generated"
I am calculating some values that I am inserting into a data frame. From what I have read, creating the dataframe ahead of time is more efficient, since rbind (so far the only solution I have found to appending to a data frame) is not very fast. What I am doing is the following: # create data frame goframe = data.frame(goA = character(10), goB = character(10), value = numeric(10)) goframe[1,] =
2012 Aug 27
3
Changing entries of column of type "factor"/Adding a new level to a factor
What is a smart way to change an entry inside a column of a dataframe or matrix which is of type "factor"? Here is my script incl. input data: > #set working directory: > setwd("K:/R") > > #read in data: > input<-read.table("Exampleinput.txt", sep="\t", header=TRUE) > > #check data: > input Ind M1 M2 M3 1 1
2007 Mar 08
1
R: Searching and deleting elements of list
you could try mapply mydata2<-mapply("[", mydata, lapply(mydata, function(x) !x %in% A)) mydata2[[1]]<-A #to replace the obviously deleted elements of "A" mydata2 mydata2[[1]] mydata2[[2]] mydata2[[3]] mydata2[[4]] Stefano -----Messaggio originale----- Da: r-help-bounces at stat.math.ethz.ch [mailto:r-help-bounces at stat.math.ethz.ch]Per conto di jastar
2010 Sep 08
0
Correction to vec-subset speed patch
I found a bug in one of the fourteen speed patches I posted, namely in patch-vec-subset. I've fixed this (I now see one does need to duplicate index vectors sometimes, though one can avoid it most of the time). I also split this patch in two, since it really has two different and independent parts. The patch-vec-subset patch now has only some straightforward (locally-checkable) speedups for
2009 Sep 30
4
How do I do simple string concatenation in R?
Dear R gurus How do I do simple string concatenation in R? For example: A = "klm" B = "jjj" How can I assign a value to C such that C == "klmjjj" is True? Thank you Arie [[alternative HTML version deleted]]
2013 Apr 17
4
[LLVMdev] Loop vectorizer behaviour for 2D arrays and parallel annotation
Hello, I am trying to vectorize the following loop but the vectorizer says: "Found a possible write-write reorder" and does not vectorize. Why? for (j=0; j < 8; j++) { jj = j << 3; m2[j][0] = diff[jj ] + diff[jj+4]; m2[j][1] = diff[jj+1] + diff[jj+5]; m2[j][2] = diff[jj+2] + diff[jj+6]; m2[j][3] = diff[jj+3] + diff[jj+7]; m2[j][4] = diff[jj ] -
2005 Oct 09
0
all.equal() improvements (PR#8191)
--k1lZvvs/B4yU6o8G Content-Type: text/plain; charset=us-ascii Content-Disposition: inline The attached patch against R 2.2.0 makes the following improvements to the all.equal() function: 1. Check names! Stock R all.equal() (unlike S-Plus) ignores names completely on some objects. I consider this wrong - if the names are different, the object is NOT "the same". 2. When a
2004 Sep 08
3
do.call("[", ...) question
Hi again everyone I have an arbitrarily dimensional array "a" and a list "jj" of length length(dim(a)). The elements of jj are vectors of indexes. How do I use do.call() to extract a[ jj[[1]], jj[[2]], jj[[3]], ...] ? Toy example follows: a <- matrix(1:30,5,6) jj <- list(5:1,6:1) I want the following a[ jj[[1]],jj[[2]] ] How do I do this? OBAttempts:
2013 Apr 17
0
[LLVMdev] Loop vectorizer behaviour for 2D arrays and parallel annotation
On 04/17/2013 04:55 AM, Anadi Mishra wrote: > Hello, > > I am trying to vectorize the following loop but the vectorizer says: > "Found a possible write-write reorder" and does not vectorize. > Why? To my knowledge, the dependence analysis in the loop vectorizer is not yet able to prove the absence of dependences here. > for (j=0; j < 8; j++) > { > jj