similar to: Variable names AS variable names?

Displaying 20 results from an estimated 6000 matches similar to: "Variable names AS variable names?"

2013 Feb 28
2
Fortune?
I think the rule is that you can do anything as long as you don't complain. If you want to complain, you must follow the instructions. -- Jari Oksanen in Re: [Rd] Keeping up to date with R-devel -- Patrick Burns pburns at pburns.seanet.com twitter: @burnsstat @portfolioprobe http://www.portfolioprobe.com/blog http://www.burns-stat.com (home of: 'Impatient R' 'The R
2010 Nov 17
3
Fatal Error R
Hello. First, I'm thankful about your wonderful project. However, I have serious worries about the reliability of R. I found the next bug which I consider important because in my job everytime We work with datanames like next. Please see below: b=data.frame(matrix(1:9,ncol=3)) names(b)=c("q99","r88","s77") >b q99 r88 s77 1 1 4 7 2 2 5 8 3
2011 Mar 31
3
Create Variable names dynamically
Hi, I want to create variable names from within my code, but can't find any documentation for this. An example is probably the best way to illustrate. I am reading data in from a file, doing a bunch of stuff, and want to generate variables with my output. (I could make a "list of lists" and name all the elements, but I really want separate variables.) ################# #This is
2011 Sep 12
3
Solve your R problems
R-help is all about solving R problems. So here ya go: http://www.portfolioprobe.com/2011/09/12/solve-your-r-problems/ -- Patrick Burns pburns at pburns.seanet.com twitter: @portfolioprobe http://www.portfolioprobe.com/blog http://www.burns-stat.com (home of 'Some hints for the R beginner' and 'The R Inferno')
2010 Aug 01
3
remove extreme values or winsorize – loop - dataframe
Hi everyone! #I need a loop or a function that creates a X2 variable that is X1 without the extreme values (or X1 winsorized) by industry and year. #My reproducible example: firm<-sort(rep(1:1000,10),decreasing=F) year<-rep(1998:2007,1000) industry<-rep(c(rep(1,10),rep(2,10),rep(3,10),rep(4,10),rep(5,10),rep(6,10),rep(7,10),rep(8,10),rep(9,10), rep(10,10)),1000) X1<-rnorm(10000)
2014 Jan 03
1
wishlist: decreasing argument to is.unsorted
I've just realized that it could be handy to have a 'decreasing' argument in 'is.unsorted'. And I'm cheekily hoping someone else will implement it. It is easy enough to work around (with 'rev'), but would be less hassle with an argument. The case I have in mind uses 'is.unsorted' in 'stopifnot'. Pat -- Patrick Burns pburns at pburns.seanet.com
2012 Jul 17
3
complexity of operations in R
Hello! I am optimizing my code in R and for this I need to know a bit more about the internals. It would help tremendously if someone could link me to a page with O()-complexities of all the operations. In this particular case, I need something like a linked list with O(1) insertLast/First ability. I can't preallocate a vector since I do not know the final size of the list ahead of time. The
2010 Jun 01
4
Plot multiple columns
I'm running a long MCMC chain that is generating samples for 22 variables. I have each run of the chain as a row in a matrix. So: Chain[,1] is the column with all the samples for variable one. Chain[,2] is the column with all the samples for variable 2, etc. I'd like to fit all 22 on a single page to print a nice summary. It is OK if the graphs are small, I just need to show the
2009 Sep 11
4
R on Multi Core
Hi, Our discussions about 64 bit R has led me to another thought. I have a nice dual core 3.0 chip inside my Linux Box (Running Fedora 11.) Is there a version of R that would take advantage of BOTH cores?? (Watching my system performance meter now is interesting, Running R will hold a single core at 100% perfectly, but the other core sites idle.) Thanks! -- Noah
2012 Mar 05
2
no partial matching of argument names after dots argument - why?
I noticed that the argument names after the dots argument are not partially matched. foo <- function(one, two, ...){ one + two } > foo(o=1, t=2) [1] 3 foo <- function(one, ..., two){ one + two } > foo(o=1, t=2) Fehler in one + two : 'two' fehlt Can someone explain me the reason for this behavior? THX Mark ???????????????????????????????????? Mark Heckmann Blog:
2011 Jan 06
1
Calcuting returns
Dear R forum helpers,I have following datatrans <- data.frame(currency_transacted = c("EURO", "USD", "USD", "GBP", "USD", "AUD"), position_amt = c(10000, 25000, 20000, 15000, 22000, 30000))date <- c("12/31/2010", "12/30/2010", "12/29/2010", "12/28/2010", "12/27/2010",
2012 Sep 05
1
run EGARCH package on REXCEl
Hi, I have limited experience on R and recently started using REXcel. Although I have been able to run both simple functions (like mean etc) and some complex ones (like Principal Component analysis, PCA) using RExcel, I am facing some problems while running EGARCH model. For this I have downloaded the 'betategarch' package for R to run EGARCH with student t dist. Although the package has
2009 Oct 16
2
Different way of scaling data
Hi, I have a data.frame that I need to scale. I've been using the scale function and it works nicely. Some of the libraries I'm testing won't accept negative values for data, so I need to find a way to scale the data from 0 to 1 Any ideas? Thans!
2013 Mar 02
3
if value is in vector, perform this function
Hi, I'm trying to set up R to run a simulation of two populations in which every 3.5 days, the initial value of one of the populations is reset to 1.5. I'm simulation an experiment we did in which we fed Daphnia populations twice a week with algae, so I want the initial value of the algal population to reset to 1.5 twice a week to simulate that feeding. I've use for loops and if/else
2012 Nov 27
2
Books for fully understanding internal logics on some packages(quantmod, xts, zoo and chron)
Hello, I'm very interested in using financial time series data, but I'm a beginner of R programming. I'd like to fully understand internal logics on several time-series related packages such as quantmod, xts, zoo, chron, etc. So, I read some books, 'R Cookbook' and 'Art of R Programming' and another simple tutorials. But I still can't understand grammars of the
2012 Sep 20
3
Applying glm coefficients (Beginner Question)
Hello, I am working with a dataset with three variables and one binomial parameter. The glm function provides coefficients for these three variables, e.g. -1.5 | 27.2 | -2.9 If I'm not mistaken, $fitted.values gives me an estimate of how likely my parameter is to be true/1 . I would like to apply these coefficients on other variables to predict the binomial parameter but I'm not sure how
2011 Mar 21
2
Correlation for no of variables
Dear R helpers, Suppose I have stock returns data of say 1500 companies each for say last 4 years. Thus I have a matrix of dimension say 1000 * 1500 i.e. 1500 columns representing companies and 1000 rows of their returns. I need to find the correlation matrix of these 1500 companies. So I can find out the correlation as cor(returns) and expect to get 1500 * 1500 matrix. However, the process
2009 Aug 30
3
Sapply
Hi, I need a bit of guidance with the sapply function. I've read the help page, but am still a bit unsure how to use it. I have a large data frame with about 100 columns and 30,000 rows. One of the columns is "group" of which there are about 2,000 distinct "groups". I want to normalize (sum to 1) one of my variables per-group. Normally, I would just write a huge
2012 Jul 05
3
Return
Hello Every one I have data on Stock prices and I want to calculate the return on all the stocks and then replace all the stock prices with the returns can any one tell me how to do My data is in the format given below Date Stock1 Stock2 Stock3 01/01/2000 1 2 3 01/02/2000 5 6 7 01/03/2000 1 2 3 01/04/2000
2011 Nov 11
3
Why does length("") == 1?
It seems obvious to me that the empty string "" is length 0. cheers Worik [[alternative HTML version deleted]]