similar to: Plotting question

Displaying 20 results from an estimated 7000 matches similar to: "Plotting question"

2006 Nov 16
1
getting a title in a plot during an lapply
In my code below tempa and tempb are numeric vectors that I combined into a dataframe along with the deciles of tempa. I have an lapply statement that goes through the dataframe and does ten plots according to the appropriate decile. The code is below and it works fine. There are no bugs so I figure there was no need to include structure statements on the data. Also, I don't want to use coplot
2010 May 06
1
How to rank matrix data by deciles?
Hi R users, I have a matrix of data similar to: > y=matrix(rnorm(55),ncol=5) I would like to know to which decile each number belongs compared to the numbers in its column. Say y[1,1] is the third decile among y[1:11,1] and y[2,1] is in the second decile I would like get a matrix that would return their ranks in decile, i.e., y[1,1] -> 3 y[2,1] -> 2 Your help is much appreciated!
2010 Mar 08
1
Help with Hmisc, cut2, split and quantile
Hello, I have a set of data with two columns: "Target" and "Actual". A http://n4.nabble.com/file/n1584647/Sample_table.txt Sample_table.txt is attached but the data looks like this: Actual Target -0.125 0.016124906 0.135 0.120799865 ... ... ... ... I want to be able to break the data into tables based on quantiles in the "Target" column. I can see (using
2006 May 09
2
devide data into decile
I guess this is really basic. But I do not find an answer yet. I have a big data.frame. I would like to divede them into 10 deciles accounding to one of its member. Then I need a number for each decile with some computaion within each group. How to devide it?
2011 Nov 04
1
Decision tree model using rpart ( classification
Hi Experts, I am new to R, using decision tree model for getting segmentation rules. A) Using behavioural data (attributes defining customer behaviour, ( example balances, number of accounts etc.) 1. Clustering: Cluster behavioural data to suitable number of clusters 2. Decision Tree: Using rpart classification tree for generating rules for segmentation using cluster number(cluster id) as target
2006 Nov 14
2
putting a column name on a zoo object
does anyone know how to put a column name on a zoo object. I think achim and gabor are off line or they have gotten totally tired of me an decided to ignore me ( which is totalyy understandable ). logbidask<-log((aggfxdata[,"bid"] + aggfxdata[,"ask"])/2.0) logbidask doesn't have a name and I can't figure out how to get one on it ? aggfxdata is a zoo object.
2012 Mar 14
1
How to use ggplot to do the binned quantile plots(one type of scatter plot)?
How to use ggplot to do the binned quantile plots(one type of scatter plot)? Hi all, I have done scatter plot: plot(x, y). Now I wanted to do binned quantile plots... can ggplot2 help me? For example, we bin x data into 10 bins. For each bin, we draw the 10 deciles of the corresponding y data in that bin as points/dots. And then accross all bins, we would like to connect the corresponding
2006 Mar 16
2
french secondary boxplot
bonjour, i'm a mathematic teacher and i have a question for R-developers : is it possible to have (in the future) a boxplot with whiskers from the first decile to the ninth decile, as usual in secondary french schools... by example : boxplot(serie,range=-1) for french boxplot ? cordialement, jean-pierre lyc?e jean zay orl?ans, france http://mathazay.free.fr/spip/
2007 Jul 10
1
exces return by mktcap decile for each year
I have a data frame, lets call it dat, with 3 columns ( mc, yr, ret) which represent market cap, year, and return. mc is a factor, mc, and ret are real numbers. I want to add a column to the data calculated as follows. For each year, I want to split the data by mc decile, then calculate the mean ret within that mc decile, and finally subtract that year's decile mean from the raw return. Then
2006 Nov 12
7
I think a simple question
I have index ( of a vector ) values of say tempin<-c(1 31 61 91 121 all the way upto 1411) What I want is a function that takes in a number say, x = 5, and gives me an new vector of tempout<-1 6 31 36 91 96 121 126 .......... 1411 1416 This can't be so hard but I can't get it and I've honestly tried. Obviously, tempin + 5 gives me the missing values but I
2005 Aug 03
2
using weighted.mean with tapply()
I am trying to calculate the weighted mean for a of 10 deciles and I get an error: > decile <- tapply(X=mat$trt1m, INDEX=mat$Rank, FUN=weighted.mean, w=mat$mcap) Error in FUN(X[[1]], ...) : 'x' and 'w' must have the same length All three of my inputs have the same length, as shown below, and the weighted.mean calculation works by itself, just not in tapply() >
2007 Jun 12
3
Panel data
Dear all R users, I have a small doubt about panel data analysis. My basic understanding on Panel data is a type of data that is collected over time and subjects. Vector Autoregressive Model (VAR) model used on this type of data. Therefore can I say that, one of statistical tools used for analysis of panel data is VAR model? If you clarify my doubt I will be very grateful. Thanks and regards,
2007 Oct 11
6
confusion with R syntax
I just noticed something by accident with R syntax that I'm sure is correct but I don't understand it. If I have a simple numeric vector x and I subscript it, it seems that I can then subscript a second time with TRUE or FALSE, sort of like a 2 dimensional array in C. Does someone know if this is documented somewhere Because it's neat but I never knew it existed. To me it seems like a
2007 Aug 24
4
Turning a logical vector into its indices without losing its length
I have the code below which gives me what I want for temp based on logvec but I was wondering if there was a shorter way ( i.e : a one liner ) without having to initialize temp to zeros. This is purely for learning purposes. Thanks. logvec <- c(TRUE,FALSE,FALSE,TRUE,FALSE,FALSE,TRUE,FALSE) temp<-numeric(length(invec)) temp[invec]<-which(invec) temp [1] 1 0 0 4 0 0 7 0 obviously, the
2006 Apr 02
2
Boxplot
bonjour, je voudrais savoir s'il serait possible de sugg?rer aux d?veloppeurs de R de proposer une option suppl?mentaire pour les moustaches, ? savoir les placer sur d1 et d9 comme c'est pr?conis? dans les programmes du secondaire en France, option du style boxplot (serie,range=91) par exemple... i would like to know if it is possible to have (with the agrement of developpers)
2006 Oct 24
4
How to start R with a file loaded?
Hi! I've made great progress in my R programming, but I am again stuck on a beginner's problem. I would like to start R with a command line that loads a file, and if possible, executes a function. Can anyone give me an example of how to do this? For example, in lisp, I would say: $ lisp -load toto.lisp -eval '(do-something $PORT)' to load the file "toto.lisp", then
2006 Nov 25
3
Multiple Conditional Tranformations
Greetings, I'm learning R and I'm stuck on a basic concept: how to specify a logical condition once and then perform multiple transformations under that condition. The program below is simplified to demonstrate the goal. Its results are exactly what I want, but I would like to check the logical state of gender only once and create both (or any number of) scores at once.
2012 Jul 09
1
boxplot with "cut"
Dear UseRs, I'm making box plots from a data set that looks like this: Chr Start End GeneDensity ReadCount_Explant ReadCount_Callus ReadCount_Regen 1 1 1 10000 107.82 1.243 1.047 1.496 2 1 10001 20000 202.50 0.835 0.869 0.456 3 1 20001 30000 158.80 1.813 1.529 1.131
2006 Oct 17
3
barplot question
i'm doing a bar plot and there are 16 column variables. is there a way to make the variable names go down instead of across when you do the barplot ? because the names are so long, the barplot just shows 3 names and leaves the rest out. if i could rotate the names 90 degrees, it would probably fit a lot more. or maybe i can use space to make the horizontal width longer ? I looed up ?barlot but
2007 Apr 16
1
Names in vector occurring in another vector
I have a vector of character strings such as mainnames<-c("CAD","AUD") and another vector say checknames<-c("CAD.l1","AUD.l1","JPY.l1","EUR.l1","CAD.l2","AUD.l2","JPY .l2","EUR.l2") I want a new vector of character strings that is just