search for: dataventur

Displaying 20 results from an estimated 26 matches for "dataventur".

Did you mean: datacenter
2012 May 22
3
pad leading zeros in front of strings
Dear All, This question sounds very simple but I don't know where I am wrong. I just want to pad leading zeros in some string, for example, "123" becomes "00123". What is wrong if I do following? > sprintf("%05s", "123") [1] " 123" It didn't return "00123", instead it padded with 'blank'. Thank you for your help
2012 Nov 06
2
R and SPSS
Hi group: I have a data set, which has severe colinearity problem. While running linear regression in R and SPSS, I got different models. I am wondering if somebody knows how to make the two software output the same results. (I guess the way R and SPSS handling singularity is different, which leads to different models.) Thanks. [[alternative HTML version deleted]]
2011 Feb 25
7
R in different OS
Hi All, I have two Rs, one has been installed in Windows system and another one has been installed under UNIX system. Is there any environmental variable or function to tell me which R I am using? The reason that I need to know it is under different system, the data path could be different. I want to do something like if it is R under Windows path =
2011 Aug 30
1
locate the needed columns
Hi All, I have a data frame, whose colnames like "A.x, B.x, C.x, A.y, B.y, C.y". There could be many columns like this pattern. I want to compare data in columns A.x with A.y, B.x with B.y and C.x with C.y etc. Suppose my data frame is d, names(d) = c("A.x", "B.x", "C.x", "A.y", "B.y", "C.y"); If I want to D1 =
2012 Apr 10
1
re-install a package
Hi All, I have a self-cooked package and save it to a zip file after running make, say named xxx.zip. After installing it to R by running "Install packages from local zip files" under Packages menu in R (Windows), I realized I needed to change some source codes and re-make it. My question is that if I need re-install that package or R would automatically update the R
2012 Jul 09
1
install.packages
Hi All, I have two questions regarding install.packages(). Q1: may I run it in non-interactive mode, which means just install the packages I want rather than letting me to choose which mirror etc? Q2: I ran a R code in batch mode, for example, R CMD BATCH a.r In a.r, I have some statements like packages = library()$result[, "Package"]; f(! "plyr" %in% packages) {
2012 Oct 26
1
backward stepwise model selection
Hi All, I know in R there is function named 'step', which does the stepwise regression and choose the model by AIC. However, if I want to choose a model per this logic: 1. Run a full model (linear regression, f = lm(y ~., data = ZZZ), for example) 2. Pick up the variable with biggest p value, delete it from the module and get a new regression model. 3. Repeat step 2
2013 Apr 03
1
how to re-shape a matrix
Hi All, I have a matrix like m <- matrix( letters[1:10], ncol=5) How to conver it to 10 * 3 matrix, which the first col is row index of m, second col is colum index of m and third column is the value of matrix, say 1 1 1 "a" 2 1 2 "c" 1 3 "e" etc... Thanks. [[alternative HTML version deleted]]
2011 Mar 10
1
aggregate by part of a field
Hi All, I have a data frame like a = data.frame(date = c(20081201, 20081202, 20081201), product = c("a b c d e", "a b c g h t", "d e h a c e h g"), sales = c(1, 2, 3)) Now I want to aggregate the sales by part of the a$product. 'Product' is the product name, a string separated by a space. The key in my aggregate function is
2014 Oct 30
2
Trouble installing Rcpp on AIX - missing "execinfo.h"
Greetings, When I try "install.packages('Rcpp')" it fails when compiling api.cpp (line 39). This is Rcpp 0.11.3. I searched my filesystem, and indeed I do not have execinfo.h anywhere. After some effort, I got R build on AIX. Now I am trying to build the packages I need. Rcpp is crucial. I first build R with the native IBM XL compilers, and Rcpp wouldn't build. That was
2011 Feb 10
2
Repeaded sampling
Hi all, I have a dataset. Each time I want to sample N(i) elements from it and I want to repeated sampling M times. N(i) is varied from time to time. For example, dataset = 1:50; a = list(); M = 1000; I want to do something like for(i in 1:M) { a[[i]] = sample(dataset,
2009 Jun 24
1
How to recursively build a binary tree with R script?
Greetings! Can someone provide a simple script for a R function that recursively builds a binary tree. I am most familiar with C and pass by reference, but I think R is like Fortran and pass by value. - Mike Beddo
2010 May 03
1
How to generate Mackey-Glass time series with "ddesolve" package?
I could use some help generating a time series for the Mackey-Glass equation: dx/dt = 0.2 x(t-tau)/(1 + x(t-tau)^10) - 0.1 x(t) for the case there tau = 17. I tried the "ddesolve" package but the dde(...) function seems to hang, not producing anything. Can someone show me the R script how to do this? - Mike Beddo [[alternative HTML version deleted]]
2011 Mar 24
2
apply mean to a three-dimension data
Hi All, Suppose I have data like [[alternative HTML version deleted]]
2011 Apr 21
3
line type lty
Hi All, Does somebody know how to know the detail of the line types? For example, lty = 1, means what kind of line?, lty = 2, means what kind of line? Thanks. HXD [[alternative HTML version deleted]]
2011 Jun 03
1
debug R code
Hi List, I have a question regarding debug R code. I know I can use debug(fuction_name) and when code runs to that point, it will go to debugger. My question is inside debugger, how to stop a code at a specified line. For example, in C (gdb or dbx debugger) I can run "stop at 123" (stop at line 123) or 'b 123' (break at line 123). Is there any similar commend in R
2011 Dec 13
0
rodbc -- save result to a table
Hi All, I am pretty new for RODBC. I want to save my table to a DB, so I used something like sqlSave(db, a, 'Forecast_Result', rownames = FALSE); But I got an error Error in sqlSave(db, a, "Forecast_Result", rownames = FALSE) : table 'Forecast_Result' already exists Yes, that table has been created before. But I need to overwrite the content in that
2011 Dec 14
0
Simple R server for SQL Server?
I have a big SQL Server application that needs some help from R, and this R needs to load a large workspace in order to service the database request. I'd like to keep an R process running continually because loading the workspace takes about 1 minute. The data in the workspace doesn't change very often. Rserve doesn't seem to align with my needs - I don't want a new workspace with
2012 Jul 11
1
Variance Inflation factor
Hi All, I need to calculate VIF (variance inflation factor) for my linear regression model. I found there was a function named vif in 'HH' package. I have two questions: 1) I was able to install that package in my R under windows. But while trying to install that package in UNIX, I got error: Package HH is not available. Does somebody know why? 2) Does
2013 Jan 24
1
how to read a website with Chinese Character
Hi all, I am planning to parse some information on a website which includes lots of Chinese characters. Does someone know how to read/display Chinese in R? Thanks. url = "http://www.teec.org.cn/html/renwujieshao/" x = readLines(url) I tried encoding = 'UTF-8' already but it didn't help. My R version is $platform [1] "i386-pc-mingw32" $arch [1] "i386"