similar to: automatic coercion to character

Displaying 20 results from an estimated 10000 matches similar to: "automatic coercion to character"

2009 Dec 01
1
Aligning Diagonally Oriented Labels Under Bar Chart
I searched the forms (i.e., R Search)?and come up with the following suggested link: ?http://cran.r-project.org/doc/FAQ/R-FAQ.html#How-can-I-create-rotated-axis-labels_003f I tried to implement what I believe was being implied by that URL and came up with the below: barplot(WorldPhones[1,], ??????? ylim=c(0, 50000), ??????? axes=FALSE, ann=FALSE, ???????
2010 May 17
3
applying quantile to a list using values of another object as probs
Hi r-users, I have a matrix B and a list of 3x3 matrices (mylist). I want to calculate the quantiles in the list using each of the value of B as probabilities. The codes I wrote are: B <- matrix (runif(12, 0, 1), 3, 4) mylist <- lapply(mylist, function(x) {matrix (rnorm(9), 3, 3)}) for (i in 1:length(B)) { quant <- lapply (mylist, quantile, probs=B[i]) } But quant
2010 Nov 26
2
get list index
Hi R-users, I have a list mylist <- list(c(0.79, 0.92, 0.91, 0.86, 0.96, 0.96, 0.95, 0.94, 0.99), c(0.28, 0.45, 0.59, 0.69, 0.80, 0.87, 0.95, 0.94, 0.98), c(0.29, 0.39, 0.59, 0.69, 0.68, 0.80, 0.93, 0.95, 0.98)) Is there a way to find the index of the list element that contains the lowest value among all the other elements? As the lowest value in each element is the first, the
2010 Sep 22
3
extracting random effects from model formula
Hi R-users I would like to extract the random effects ("1|SITE", "1+SPECIES|SITE" and "BA|SITE") from this model formula: Full_model <- formula (VAR ~ (1|SITE) + (1+SPECIES|SITE) + (BA|SITE) + HEIGHT + COND + NN_DIST) I tried: terms(Full_model) labels(terms(Full_model)) but I could not distinguish between random and fixed effects. thanks
2010 Jul 29
4
reading dates in Excel into R
I am reading dates in Excel2007 into R. Here are the functions I used: library(RODBC) channel<-odbcConnectExcel2007("myfile.xlsx") tmp<-sqlFetch(channel,"1",as.is=T) The dates in myfile.xlsx are all in this format: mm/dd/yyyy. But when I read it to R, some columns look like "yyyy-mm-dd 00:00:00", some columns look like "yyyy-mm-dd", and some
2008 Dec 11
5
Row order in plot
I'm new to R so forgive me if this seems like a simple question: So I have table where the row titles are string variables. When I plot the data with rows along the x-axis, the data is ordered alphabetically as opposed to the order of the table. How can I preserve the row order of the table in the plot? Thanks in advance. -- View this message in context:
2010 Jul 13
2
modifying vector elements
Hello R-users, I have a very large vector (a) containing elements consisting of numbers and letters, this is the i.e. a [1] "1.11.2a" "1.11.2d" "1.11.2e" "1.11.2f" "1.11.2x1" "1.11.2x1b" [7] "1.11.2x2" "1.11.2x2a" "1.11.2x2b" "1.11.2x3" "1.11.2x4"
2011 Aug 25
1
change values in a character vector
Greetings! I have a 127 long vector with all different character entries. I need to generate another vector that is 6 times a long and the second one and has the following structure: NA "foo" "a unique string" NA "bar" "blah" NA "foo" "another unique string" NA "bar" "blah" ..... This has to be repeated 127
2010 Mar 31
3
creating a variable using concatenation
A general problem i run into, i know there must be a simple solution. I like to create a variable by appending a 1 for example, (i need to loop later on from 1 to X, thus the reason for this). So i assign the variable vplot with this value, however it has quotes and when i use it in a barplot, it throws an error. but the tcenter$X1 does exist, its an element of a data frame. So if i type
2009 Apr 02
2
Scatter plot
Hi. How do I plot the straight line and r? in a scatter plot using a simple file x~y? Sueli Rodrigues Eng. Agr?noma - UNESP Mestranda - USP/ESALQ PPG-Solos e Nutri??o de Plantas Fones (19)93442981 (19)33719762
2010 Sep 27
3
name ONLY one column
Hi R-users I can not change the name of one column only of my matrix. my_matrix <- matrix (1:12,ncol=3) colnames(my_matrix)[1] <- 'myname' Error in dimnames(x) <- dn : length of 'dimnames' [2] not equal to array extent thank you for your help Lorenzo [[alternative HTML version deleted]]
2016 Apr 28
0
polygon angle option perpendicular to axis
Tena koe Simon plot(1:10, 1:10, type='n') polygon(c(2,3,6,8), c(2,5,5,3), density=20, angle=90) polygon(c(2,3,6,8), 5+c(2,5,5,3), density=20, angle=0) I don't understand your problem. Perhaps if you "provide[d] commented, minimal, self-contained, reproducible code" it would help. HTH .... Peter Alspach -----Original Message----- From: R-help [mailto:r-help-bounces at
2011 Aug 25
2
string manipulation
I R-users, I am trying to find the way to manipulate a character string to select a 4 digit number after some specific word/s. Example: mytext <- "I do not want the first number 1234, but the second number 5678" Is there any function that allows you to select a certain number of digits (in this case 5678) after a particular word/s (e.g., second number) Thank you for your help
2011 Oct 31
3
Plot two matrices and keeping the record of row names
Dear all, I have two data frames- x1 and y1 with same row names and column names(actually the names of the patients). x1 a b c d e a 1.0000000 0.4730679 0.6226994 0.6036036 0.6433333 b 0.4730679 1.0000000 0.6227273 0.6303855 0.5730858 c 0.6226994 0.6227273 1.0000000 0.7290503 0.6900585 d 0.6036036 0.6303855 0.7290503 1.0000000
2016 Apr 27
4
polygon angle option perpendicular to axis
I am trying to use the angle option in polygon to create polygons filled with horizontal and vertical lines. The polygons I am crating are irregular and it the angle function appears to set the angle of the shading perpendicular to the polygon sides rather than perpendicular to the axes. Is there any way to set the angle relative to the axes rather than relative to the polygon sides?
2010 Aug 11
2
storing the results of an apply call
Hi R-users, I have a function (myfun) that I want to apply to the rows of a matrix. Basically, "myfun" takes the values from the matrix ("exp.des"), which represent the different combinations of my experimental design, and pass them as arguments to some other functions (fun1 and fun2). As I want to replicate the results of fun1 and fun2 a certain number of time (e.g. 5), I
2009 May 14
3
memory usage grows too fast
Hi All, I have a 1000x1000000 matrix. The calculation I would like to do is actually very simple: for each row, calculate the frequency of a given pattern. For example, a toy dataset is as follows. Col1 Col2 Col3 Col4 01 02 02 00 => Freq of ?02? is 0.5 02 02 02 01 => Freq of ?02? is 0.75 00 02 01 01 ? My code is quite simple as the following to find the pattern ?02?.
2013 Sep 22
2
Arcsine transformation
I am tryin to perform an arcsine transformation on my data containig percentages as the dep. variable. Does anyone have a code that I could use to do that? I am relatively new to R. Thanks for your help! -- View this message in context: http://r.789695.n4.nabble.com/Arcsine-transformation-tp4676706.html Sent from the R help mailing list archive at Nabble.com.
2016 Apr 28
1
polygon angle option perpendicular to axis
Thanks for the question. Here is a sample of the code for my plot: Top = c(34, 39, 42, 45, 46, 41, 41, 40, 43, 38, 33, 33) Bottom = c(24, 29, 32, 36, 32, 34, 32,41, 40, 39, 29, 24) plot(1,1, col = "white", xlim = c(1.3,11.7), ylim = c(0,80), axis = FALSE, xaxt = "n") axis(1, at = c(1:12)) polygon(c(c(1:12),c(12:1)), c(top, bottom), col =
2010 Nov 03
2
memory allocation problem
Hi R users I am trying to run a non linear parameter optimization using the function optim() and I have problems regarding memory allocation. My data are in a dataframe with 9 columns. There are 656100 rows. >head(org_results) comb.id p H1 H2 Range Rep no.steps dist aver.hab.amount 1 1 0.1 0 0 1 100 0 0.2528321