similar to: Coercion of percentages by as.numeric

Displaying 20 results from an estimated 600 matches similar to: "Coercion of percentages by as.numeric"

2005 Oct 27
1
data.frame-question]
First a general comment on posting style, could you please be more specific about where the error occurs as without this it is very difficult to identify what the problem is. Now concerning your problem. When I tried the code I posted yesterday I thought it worked fine. I've tried it again now and found that the data.frame TAB3 actually only has one column and the names "A",
2005 Nov 14
2
[<- and indexing for zoo objects
Hi I've been greatly enjoying the functionality the zoo package offers. However I've hit a snag with the following code > a <- zoo(matrix(1:10,5,2), 2001:2005) > a 2001 1 6 2002 2 7 2003 3 8 2004 4 9 2005 5 10 > a[I(2003), 2] 2003 8 > a[I(2003), 2] <- NA Error: subscript out of bounds > I've also tried > coredata(a[I(2003), 2])
2005 Oct 25
2
data.frame-question
Dear R-List, I am very new to R and programming itself, so my question may be easy to answer for you. I tried a lot and read through the manuals, but I still have the following problem: I have 2 data-frames: Number<-as.numeric (Number) Name<-as.character (Name) TAB1<-data.frame (Name,Number) - it looks like this:- Name Number A 2 A 3 A 6 B 8 B 12 B 7 C 8 D 90 E 12 E 45 佲仸
2006 Jul 03
1
rownames, colnames, and date and time
Hi all I was wondering whether there has ever been an update on the rownames and colnames behaviour as described by Eric below? I still get the same behaviour, exactly as described by Eric, on my WinXP installation of R-2.3.0. I also posted a message to r-help on Friday but looking through the online archives it seems to have not made it to the list. I would agree with Eric that a consistent
2006 Apr 07
1
rownames for as.matrix.zoo
On Fri, 7 Apr 2006 16:09:53 +0200 Brandt, T. (Tobias) wrote: > Hi > > Is there a reason why as.matrix.zoo doesn't set the rownames to the > index like as.data.frame.zoo does? Yes, oversight, I think ;-) Added to the devel-version of zoo. I'll try to get it out to CRAN in the next days. Z > Thanks > > Tobias > > > > library(zoo) > > x.Date
2007 Jan 15
2
Problem with pdf, png, jpeg devices and files named CON on Window s
Hi I cannot seem to create any files that have the name "CON" before the file extension, i.e. all of the following fail: > pdf("CON.pdf") Error in pdf("CON.pdf") : unable to start device pdf > jpeg('CON.jpeg') Error in jpeg("CON.jpeg") : unable to start device devWindows > png('CON.png') Error in png("CON.png") : unable
2002 Feb 23
1
"Out of memory" install error message
Hi folks, I've been trying to install a legacy 16-bit Windows app called Expensable, published about 7 years ago by Intuit. Over the years I've run it natively, under Win-OS/2, and under Wine with a native Windows partition. Never a problem. Now that I've removed the Windows partition from my Linux box, I've set up Wine to work with fake Windows. The installation is fine, and
2006 Oct 26
2
pairs matchning
Hi You could try to find an equivalent representation as a string and try to match those. > (A <- cbind(sample(1:2, 10, rep=TRUE), sample(1:2, 10, rep=TRUE))) [,1] [,2] [1,] 1 2 [2,] 1 2 [3,] 1 2 [4,] 2 2 [5,] 1 1 [6,] 1 2 [7,] 1 2 [8,] 1 1 [9,] 1 2 [10,] 1 1 > (B <- unique(A)) [,1] [,2] [1,] 1 2
2006 Oct 18
2
sqlSave, fast=F option, bug?
Hi, Using the fast=F option, sqlSave saves without matching column names. It looks like a bug to me.......... Here's a simple (artificial) example. ----------------------------------------- Create a dataframe and save it to a database table "test" as follows: df <- data.frame(T=1, S=10) sqlSave(channel, df, "test", rownames=F) The table now looks like T S 1 10 If
2006 Mar 23
0
sqlSave
Dear Tobias, I finally succeeded in exporting my dataframes from R into Access with this script: library(RODBC) canal <- odbcConnectAccess("D:/Floristique.mdb") sqlSave(channel=canal, dat=flore, tablename="Floristique", rownames=F, safer=F, fast=F, varTypes=c(dates="Date")) odbcClose(canal) My problem in exporting my dataframe "flore" seems to
2006 Oct 28
2
subsetting, aggregating and zoo
Hi, Having an zoo object I can subset it to obtain the days where I have the values within some range: is.zoo(z) TRUE subset(z[,1], z[,1]>=5 & z[,1]<= 10) #Yields: Year(day) 1988(13) 1988(14) 1988(16) 1988(20) 1988(21) 1988(22) 1988(25) 1988(26) 7.973946 9.933518 7.978227 7.512960 6.641862 5.667780 5.721358 6.863729 1988(27) 1988(28) 1988(29) 1988(30) 1988(32)
2006 Oct 26
1
Up- or downsampling time series in R
Hi I have data that is sampled (in time) with a certain frequency and I would like to express this time series as a time series of a higher (or lower) frequency with the newly added time points being filled in with NA, 0, or perhaps interpolated. My data might be regularly or irregularly spaced. For example, I might have quarterly data that I would like to handle as a monthly time series with
2006 Nov 22
3
odd behaviour of %%?
Dear R Helpers, I am trying to extract the modulus from divisions by a sequence of fractions. I noticed that %% seems to behave inconsistently (to my untutored eye), thus: > 0.1%%0.1 [1] 0 > 0.2%%0.1 [1] 0 > 0.3%%0.1 [1] 0.1 > 0.4%%0.1 [1] 0 > 0.5%%0.1 [1] 0.1 > 0.6%%0.1 [1] 0.1 > 0.7%%0.1 [1] 0.1 > 0.8%%0.1 [1] 0 > 0.9%%0.1 The modulus for 0.1, 0.2, 0.4 and 0.8 is
2006 Nov 15
2
filling an array, vectorized
Hi, I am sure this has come up before, but my searches of the archive didn't give any results (maybe I didn't use the right keywords, but if I use too many, the search times out). I have a vector of dimensions n, length is not fixed, eg n <- c(4,5,7) or n <- c(19,4,5,7) and a function f that takes a vector of indices, same length of n, and gives a scalar. I would like to fill
2012 Nov 04
0
parallel::mclapply list coercion limits opportunities for code re-use?
The attached diff address the following issues in mclapply mclapply coerces non-lists or objects (S3 or S4) to lists, but a list may not be an efficient representation and is not required if the object implements length, [, and [[ methods (lapply must also work on the object, either through coercion to a list at the 'inner.do' level or through other means, e.g., promoting lapply to a
2008 Mar 11
1
NAs introduced by coercion
Hallo, i get a warning message that NAs are introduced by coercion, so my idea is to write a function to see which values are turned into NA For this i need to write a function to go through (loop) the original data and the transformed (with the introduced na) to see which data were transformed to NA. So the return of this function should be a 2*many matrix like structure, eg names:
2011 Dec 04
0
How to write (complex) coercion methods or "what's the reason to limit 'setAs()' the way it is limited"?
Dear list, I'd like to write coercion methods for some of my Reference Classes. However, using 'setAs()' is not a real option as its argument 'def' only allows for functions depending on one single argument. In some cases, that is simply too much of a limitation for me. And I don't really see why it needs to be this way, so I guess this question is also some sort of a
2007 Oct 17
1
ignorable warnings of as.numeric: NAs introduced by coercion
Warnings are a good thing and can help to find errors in data. But with newer R versions I get more and more warnings which I would like to suppress in defined circumstances. In the manual of as.numeric() is noticed: as.numeric(c("-.1"," 2.7 ","B")) # (-0.1, 2.7, NA) + warning If I know that my data contains characters and if I would like that they will be
2003 Jan 08
0
integer coercion when indexing and subsetting (PR#2430)
At the end of his bug report, Philippe says PhGr> ..... Moreover, the subset operation [] uses as.integer() and PhGr> consequently, can suffer from the same syndrome. A WARNING section in PhGr> Extract.Rd would be welcome too. [BTW: Thank you Philippe! ] Currently, "Extract.Rd" does not say anything on the kind of indices `i' that can be used in things like
2003 Feb 27
0
unwanted coercion of length 0 vectors (PR#2587)
When something is assigned to an element of a vector that was previously of length 0, the vector is coerced to the mode of the something, regardless of whether the coercion is necessary under normal R rules. In particular, if NA is assigned to an element of a vector that was previously length 0, the mode of the vector is coerced to 'logical'. For example, here's the normal behaviour: