Displaying 20 results from an estimated 2000 matches similar to: "extracting rows and columns from a big matrix"
2011 Aug 20
2
a Question regarding glm for linear regression
Hello All,
I have a question about glm in R. I would like to fit a model with glm function, I have a vector y (size n) which is my response variable and I have matrix X which is by size (n*f) where f is the number of features or columns. I have about 80 features, and when I fit a model using the following formula,?
glmfit = glm(y ~ x1 + x2 + x3 + x4 + x5 + x6 + x7 + x8 + x9 + x10 + x11 + x12 + x13
2018 Mar 14
2
truncation/rounding bug with write.csv
I don't see the issue here. It would be helpful if people would report
their sessionInfo() when reporting whether or not they see this issue.
Mine is
> sessionInfo()
R version 3.4.3 (2017-11-30)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Arch Linux
Matrix products: default
BLAS/LAPACK: /usr/lib/libopenblas_haswellp-r0.2.20.so
locale:
[1] LC_CTYPE=en_US.UTF-8
2018 Mar 14
2
truncation/rounding bug with write.csv
Hello, I have looked on https://www.r-project.org/bugs.html , but it seems
that this is the only way to do it.
The issue is that the precision used by write.csv is on consistant for big
files. See the following code:
First I create a large dataframe filled with random uniform values. Then I
write it to .csv and print out the first and last lines.
df = data.frame(replicate(100, runif(1000000,
2018 Mar 14
2
truncation/rounding bug with write.csv
To my surprise, I can confirm on Windows 10 using R 3.4.3 . As tail is not
recognized by Windows cmd, I replaced with:
system('powershell -nologo "& "Get-Content -Path temp.csv -Tail 1')
The last line shows only 7 digits after the decimal, whereas the first have
15 digits after the decimal. I agree with Dirk though, 1.6Gb csv files are
not the best way to work with
2004 May 11
1
calling data frames
Dear List,
I've around 1000 *.txt files, I've generate with other software.
I've now done the following code (below).
My question is how can I automate this (with do.call () ?), so it could be
done for all the *.txt files.
Thanks in advance,
Rog??rio
names<- list.files()
file <- "BLU_Var_%04d.txt"
for(i in 1:1000){
2010 May 11
1
Help with Names
Hi - a newbie question, if someone can please help....
I want to change X1, X2,,.....to X.1 X.2 etc in the names below. I am using
the Principal Component Regression function (pcr) and it seems to want it
this way
> datap3.pcr <- pcr(water ~ X, 10, data = datap3, Validation ="cv")
Error in model.frame.default(formula = water ~ X, data = datap3) :
invalid type (list) for
2011 Jun 01
1
as.character limits length of result for formula
If you want a character representation of a long formula (or
a formula with long names), you can use:
as.character(my.formula)
However restriction on length of an as.character result
returns only the beginning of a long formula, and without comment.
In most cases, the following expression provides the complete
result:
paste(my.formula[[2]], " ~ ",
2013 Apr 05
1
Accessing examplars in apcluster (apcluster package)
Hi,
I was wondering how it was possible to access the actual cluster exemplars
from the APResult class. Currently it only spits it out onto the terminal
if you type the object but there is no other way to see which one is the
examplar.
Would appreciate any help.
Thanks,
Sachin
[[alternative HTML version deleted]]
2013 Apr 12
2
model frame and formula mismatch in model.matrix()
Hello everyone,
I am trying to fit the following model
All X. variables are continuous, while the conditions are categoricals.
model <- lm(X2
2009 Jun 24
2
change the height or scale of the y axis
Hallo, All,
I have a question about changing the height or scale of the y axis. When I
use following two R codes, I can get two plots. Please look at the y axes,
the number of indices (x1, x2, ?) on the y axis in the first plot is smaller
than that in the second plot, and hence the space between any two indices in
the first plot is wider than that in the second plot. As the number of
indices
2012 May 25
2
Query about creating time sequences
Hi All,
I have a query about time based sequences. I know such questions have been
asked a lot on forums, but I couldnt find the exact thing that I was
looking for.
I want to create a time-based sequence which will mimic the trading window
AND would span multiple days. Something like below:
"2011-01-03 09:15:00 IST"
"2011-01-03 09:15:01 IST"
....
....
....
"2011-01-03
2006 Mar 11
1
Non-linear Regression : Error in eval(expr, envir, enclos)
Hi..
i have an expression of the form:
model1<-nls(y~beta1*(x1+(k1*x2)+(k1*k1*x3)+(k2*x4)+(k2*k1*x5)+(k2*k2*x6)+(k3*x7)+(k3*k4*x8)+(k3*k2*x9)+(k3*k3*x10)+ (k4*x11)+(k4*k1*x12)+(k4*k2*x13)+(k4*k3*x14)+(k4*k4*x15)+(k5*x16)+(k5*k1*x17)+(k5*k2*x18)+(k5*k3*x19)+
2006 Nov 06
5
memory issues with new release (PR#9344)
Full_Name: Derek Elmerick
Version: 2.4.0
OS: Windows XP
Submission from: (NULL) (38.117.162.243)
hello -
i have some code that i run regularly using R version 2.3.x . the final step of
the code is to build a multinomial logit model. the dataset is large; however, i
have not had issues in the past. i just installed the 2.4.0 version of R and now
have memory allocation issues. to verify, i ran
2005 Aug 15
2
queer data set
I have a dataset that is basically structureless. Its dimension varies
from row to row and sep(s) are a mixture of tab and semi colon (;) and
example is
HEADER1 HEADER2 HEADER3 HEADER3
A1 B1 C1 X11;X12;X13
A2 B2 C2 X21;X22;X23;X24;X25
A3 B3 C3
A4 B4 C4 X41;X42;X43
A5 B5 C5 X51
etc., say. Note that a blank
2012 Aug 08
1
dimnames in array
Hello,
I'm working with an array; I'm trying to make it so that an array of
dim(42,2,2) has names whose length corresponds to that of the array,
and am hoping someone with experience with this can see what I'm not
doing correctly:
data11 = array(0,c(41,2,2))
y = lsoda(x0,times,fhn$fn.ode,pars)#This is make.fhn() from colloc
infer package#
y = y[,2:3]
2013 Jul 04
6
ggplot2
Hello Folks,
I have a database of 2000+ days with 35 observations each. I am trying to
modeling a time series by day, but it seems a problem that I don<t have the
time of the observation. I achieve something interesting by using the
barplot function, but I`d rather working with ggplot2, since I have the book
by Hadley Wickham in hands.
I start by transforming my data into a dataframe, but
2012 Aug 08
1
basehaz() in package 'Survival' and warnings() with coxph
Hello,
I have a couple of questions with regards to fitting a coxph model to a data
set in R:
I have a very large dataset and wanted to get the baseline hazard using the
basehaz() function in the package : 'survival'.
If I use all the covariates then the output from basehaz(fit), where fit is
a model fit using coxph(), gives 507 unique values for the time and the
corresponding cumulative
2007 Mar 10
3
long character string problem
Hi All
I am having 2 very long character strings (550chars) and I want to put them as
expressions together with c(). The problem is that I also get these
double-quotes, as seen below in 'fct'. How can I remove these double-quotes? I
tried as.name() but it did not work (because of size?). These are creating
trouble with subsequent programs, which I tested with strings that for some
2012 Aug 09
1
basehaz() in package survival and warnings with coxph
I've never seen this, and have no idea how to reproduce it.
For resloution you are going to have to give me a working example of the
failure.
Also, per the posting guide, what is your sessionInfo()?
Terry Therneau
On 08/09/2012 04:11 AM, r-help-request at r-project.org wrote:
> I have a couple of questions with regards to fitting a coxph model to a data
> set in R:
>
> I have a
2018 Mar 14
0
truncation/rounding bug with write.csv
My apologies for not including sessionInfo(), and I'm a bit angry at myself
for that. Retrying in a fresh session of R, I get different results. More
specifically, I get the expected result where accuracy is the same in the
first and the last line. As I didn't include my sessionInfo() in my
previous mail, I can't figure out why I now have a different result. So I'm
positive