similar to: Rownames are always character?

Displaying 20 results from an estimated 1000 matches similar to: "Rownames are always character?"

2013 Nov 21
1
[PATCH] suggestions for R-lang manual
Attached is a patch with suggestions for the R-lang manual at r64277. Below are a few comments (some are implemented in the patch): In the section "Objects", there is a table introduced by "The following table describes the possible values returned by typeof". One of the results is "any". Can "any" be returned by "typeof()" ? Regarding the
2008 May 30
4
Request: Documentation of formulae
In working through material on p.272 of MASS (4th ed.), I came across the following model formula: pet1.lm <- lm(Y ~ No/EP - 1, Petrol) I was at a loss to understand the use of "/" until I looked in "An Introduction [!] to R," where I found the explanation. My request is that more complete material on model formulae be lifted from "Introduction to R" (or
2007 Jan 24
4
Text position in Traditional Graphics
R 2.4.1 on Windows XP. Question: In traditional graphics, is it possible to find out the height of a line of text in units that can be used in arithmetic and then in calls to text()? Context: I have written a function that draws a plot and then, depending on whether some arguments are TRUE or FALSE, draws various lines of text in the plot. The text lines may be turned on or off individually
2008 Dec 31
3
Plotmath with values?
I hope to use the plotmath facility to print titles that mix math and values of R variables. The help for "plotmath" has an example, which after repeated reading, I find baffling. Likewise, I have read the help file for "substitute" (wqhich seems to be needed) without ever understanding what it does, other than being used in some magic incantations. I would like to do
2006 Oct 25
2
Coding style query (braces)
Re: placement of braces and "else" clauses. At the R prompt, I believe their placement must avoid causing a syntactically complete statement at the wrong place. This can results in what might be considered rather awkward looking code. IF it is known that code will be used via sourcing a script only, is there any potential problem with placing braces as shown below ? xxx <-
2006 Mar 21
1
rownames, colnames, and date and time
I noticed something surprising (in R 2.2.1 on WinXP) According to the documentation, rownames and colnames are character vectors. Assigning a vector of class POSIXct or POSIXlt as rownames or colnames therefore is not strictly according to the rules. In some cases, R performs a reasonable typecast, but in some other cases where the same typecast also would be possible, it does not. Assigning a
2006 Mar 21
1
rownames, colnames, and date and time
I noticed something surprising (in R 2.2.1 on WinXP) According to the documentation, rownames and colnames are character vectors. Assigning a vector of class POSIXct or POSIXlt as rownames or colnames therefore is not strictly according to the rules. In some cases, R performs a reasonable typecast, but in some other cases where the same typecast also would be possible, it does not. Assigning a
2003 May 30
3
Time for Usenet R Group?
I probably shouldn't suggest this, because I can't volunteer to implement it. However, I bring it up in the hopes that if (1) others agree and (2) the R core group think it a good idea that a suitable volunteer will come forward. I am finding that the flood of R email messages is becoming difficult to deal with, even using filters, etc., in my email client. Would we be better
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
2007 Feb 28
1
Help with "row.names = as.integer(c(NA, 5))" in file from dput
I am trying to understand why syntax used by dput() to write rownames is valid (say, when read by dget()). I ask this because I desire to emulate its actions *reliably* in my For2R routines, and I won't be comfortable until I understand what R is doing. Given data set "fred": > fred id var1 1 1991 0.4388587 2 1992 0.8772471 3 1993 0.6230486 4 1994 0.2340929 5 1995
2007 Sep 16
1
programming question
Dear list, I have a vector of numbers, let's say: myvec <- c(2, 8, 24, 26, 51, 57, 58, 78, 219) My task is to reduce this vector to non-reducible numbers; small numbers can cross-out some of the larger ones, based on a function let's say called reduce() If I apply the function to the first element 2, my vector gets shorted to: > (myvec <- reduce(myvec[1])) [1] 2 24 51
2003 Oct 18
2
Oceanographic lattice plots?
R 1.8.0 on Windows XP Professional. A huge THANK YOU to the R Team for this marvelous software. I am making lattice plots of oceanographic data. The usual layout does not conform to plotting conventions that marine scientists use when depth is the independent variable. Under those conventions, plots are made with the origin at the upper left, depth on the vertical axis (increasing as it
2008 Jul 18
3
Change font-face in title
Dear List, Is there a possibility to change the font-face for a part of the title of a plot? For example I have the following... plot(nirs, type="l", xlab="Wellenl?nge [nm]", col="darkslategray", main = "Spektrum Deschampsia caespitosa") ...and I would like to change the part of the title-string "Deschampsia caespitosa" to italics? Is
2011 Aug 31
1
formatting a 6 million row data set; creating a censoring variable
List, Consider the following data. gender mygroup id 1 F A 1 2 F B 2 3 F B 2 4 F B 2 5 F C 2 6 F C 2 7 F C 2 8 F D 2 9 F D 2 10 F D 2 11 F D 2 12 F D 2 13 F D 2 14 M A 3 15 M A 3 16 M A 3 17
2004 Jul 15
3
More on global environment
To follow up on my previous question, suppose a user R session wants to unload one workspace and load another within an R session. Is the following the correct sequence? 1. save.image() to save the current workspace as .Rdata in the current working directory. 2. rm(list=ls()) to remove everything from the workspace. 3. setcwd("xxx") to set the new working directory. 4.
2017 Jun 27
2
paste strings in C
Dear R-devs, Below is a small example of what I am trying to achieve, that is trivial in R and I would like to learn how to do in C, for very large matrices: > (mymat <- matrix(c(1,0,0,2,2,1), nrow = 2)) [,1] [,2] [,3] [1,] 1 0 2 [2,] 0 2 1 And I would like to produce: [1] "a*C" "B*c" Which can be trivially done in R via something like: foo
2010 Jul 15
2
replace negative numbers by smallest positive value in matrix
Hi Group, I have a matrix, and I would like to replace numbers less than 0 by the smallest minimum number. Below is an small matrix, and the loop I used. I would like to get suggestions on the "R way" to do this. Thanks, Juliet # example data set mymat <- structure(c(-0.503183609420937, 0.179063475173256, 0.130473004669938, -1.80825226960127, -0.794910626384209, 1.03857280868547,
2008 Nov 24
4
Replace NaN with zero
I need help with replacing NaN with zero (the value '0') in my dataset. The reason is that I can't get it to graph because of the NaN in the dataset. I have tried: data[is.nan(data)] <- 0 that others have suggested in the help archives but this does nothing so I am not sure what I am doing wrong. Thanks in advance for your help. [[alternative HTML version deleted]]
2005 Dec 20
4
Installing packages into updated R
A minor inconvenience in updating an R installation is remembering which packages were installed previously. Has anyone written a script to inspect a previous installation, then get & install the same packages into the new installation? -- Michael Prager NOAA Center for Coastal Fisheries and Habitat Research Beaufort, North Carolina 28516 Opinions expressed are personal, not official.
2002 Dec 23
1
Plot scales
I remember reading somewhere that locations on plots (in my case, arguments x and y for legend()) can be specified in several scales besides the usual data scale. I would like to set x and y as proportions of total plot size or something similar. Can anyone steer me to documentation on how to do it? -- Michael Prager, Ph.D. <Mike.Prager at noaa.gov> NOAA Center for