Dear R helpers,
I created a somewhat big database (+206,700 rows) in MySQL and have
exported into a csv file, but I can't open the whole thing in R. I am
using:
base-read.csv(/path/to/file.csv, header=F, sep=, nrows=206720)
R doesn't complain but it only opens 128,328 observations (the number
Alex Ruiz E. wrote:
Dear R helpers,
I created a somewhat big database (+206,700 rows) in MySQL and have
exported into a csv file, but I can't open the whole thing in R. I am
using:
base-read.csv(/path/to/file.csv, header=F, sep=, nrows=206720)
R doesn't complain but it only opens 128,328
R version/sessionInfo()?
/H
On Fri, May 21, 2010 at 10:08 PM, David Reiss dre...@systemsbiology.org wrote:
Hi,
I am trying to check a package via R CMD CHECK and it is failing with
Error: '\s' is an unrecognized escape in character string starting \s
The culprit looks something like this:
After reading more, I understand I didn't formulate my last question
correctly, so please allow me to rephrase:
What I am looking for is a way to save the R console session output.
That is, a command that would combine the results of using:
?sink # And
?savehistory
My motivation for this is
Thank you to all of those who are trying to help me.
I am using Windows XP, and using a screen reader called JAWS. When I type
something at the console, I hear once what I have typed, and then the focus
is on the next line. Then if I press the up arrow key I get to hear the
function I just
Hello Greg,
This is exactly what I was looking for, thank you very much for both writing
the code and of replying here!
I'll publish a small hack that uses this with R2wd shortly, in the hopes it
will help Faiz request.
Best,
Tal
Contact
Hi,
I have two different sets of data from two different populations. I want
to plot these samples (for example: Line graph) by just one graph.
could you please help me?
Thanks
Khazaei
__
R-help@r-project.org mailing list
Hello Faiz,
I just wrote an extended tutorial that (I believe) fully addresses your
question, here:
http://www.r-statistics.com/2010/05/helping-the-blind-use-r-by-exporting-r-console-to-word/
(It is based on Greg Snows answer on the other thread, coupled with
the article I once wrote on some of
Hello Duncan, David, and other R-help mailing list members.
I found the solution using Greg Snow answer to this thread.
I wanted to have that so to help a blind person who asked on the mailing
list how to direct R output to word.
I wrote up a solution, and wrapped it with words. It is now
Hi all,
As I wrote on other instances of this thread (that I think gotten split
because of me - my apologies for that!), I was able to use Greg Snow
solution to write something up for Faiz (and other blind R users), to help
direct R output into word.
I published it here:
You might also try setting the following parameters on read.csv:
comment.char='', quote=''
If you have a #, this might cause missing data; also an unbalanced
quote will cause missing lines.
On Sat, May 22, 2010 at 2:12 AM, Erik Iverson er...@ccbr.umn.edu wrote:
Alex Ruiz E. wrote:
Dear R
Hi!
I'm learning Mathematical Statistics at a hungarian university.
My teacher, who teaches these lessons, using the R to introduce some
topics.
I want to pass on the exam, and this exam contains some R questions too,
but the teacher doesn't thaught us too much about R, so I would like to
Tal Galili wrote:
After reading more, I understand I didn't formulate my last question
correctly, so please allow me to rephrase:
What I am looking for is a way to save the R console session output.
That is, a command that would combine the results of using:
?sink # And
?savehistory
I
On 22.05.2010 08:18, Henrik Bengtsson wrote:
R version/sessionInfo()?
/H
On Fri, May 21, 2010 at 10:08 PM, David Reissdre...@systemsbiology.org wrote:
Hi,
I am trying to check a package via R CMD CHECK and it is failing with
Error: '\s' is an unrecognized escape in character string
On May 22, 2010, at 9:08 AM, Csaba Szigeti wrote:
Hi!
I'm learning Mathematical Statistics at a hungarian university.
My teacher, who teaches these lessons, using the R to introduce some
topics.
I want to pass on the exam, and this exam contains some R questions
too,
but the teacher
Dear R users,
How to find all single minima within each next part of analyzed vector (table)
Select all minima (mass_value=min mass_value2)
(many) in vector(table),
BUT first put mask on table in order to select
within one window mask (5 elements) only one local minimum, and next to search
Hi All,
I am trying to do an instrumental variables regression with time series data
in R 2.11.0. I am using the package AER and have so far used ivreg for
estimation. I would also like to do some postestimation tests: test for
endogeniety, test of overidentifying restrictions and test of weak
I have installed RWinEdt but when I try to load it, I get the message :
Error in normalizePath(path) :
path[1]=C:\Users\yves\AppData\Roaming\WinEdt/R.ini: The specified file
cannot be found.
I have the problem with R 2.11.0 and R 2.10.1, since I have re-installed
WinEdt.
Yves
This is not enough information to let us give a good example but perhaps ?lines
or ?points might help?
Example
aa - 1:5
bb - 1:5
cc - c(1.5,2.5,3.5,4.2,4.4)
plot(aa,bb)
lines(aa,cc,col='red')
points(aa,cc, col=blue)
--- On Sat, 5/22/10, khaz...@ceremade.dauphine.fr
Hi,
I have two (large) matrices A and B of dimensions (m,n) and (p,n) respectively.
I'd like to see if the is a fast way to compute a new matrix C with
dimension (m*p,n) in which each row in C is found by applying some
function f to each pair of rows (x,y) where x is a row in A and y is a
row in
Dear R-Helpers,
If you know of any Stata users looking to learn R, our book R for Stata
Users finally shipped this week. A software snag delayed the printing
of all Springer books for quite a few weeks. A description of that book,
and reviews of its predecessor, R for SAS and SPSS Users is at
Looks like you have some numerical precision issues. Why not use the svd
function directly? (See below.)
-tgs
x - read.table(
textConnection(
Sample1 0.7329881 0.76912670 2.45906143 -0.06411602 1.2427801
0.3785717 2.34508664 1.1043552 -0.1883830 0.6503095
Sample2 -2.0446131
Dear R/LaTex user,
I'm simply trying to include a plot created with the Lattice wireframe
function into LaTex. I have no problems including other R plots into LaTex
by exporting as a Postcript and then including the graph in LaTex using
\begin{figure}
% Requires \usepackage{graphicx}
Ah, you are right, it is in one of my Rd file, not in my actual code.
Sorry for the misunderstanding, and thanks for the solution.
-David
2010/5/22 Uwe Ligges lig...@statistik.tu-dortmund.de
On 22.05.2010 08:18, Henrik Bengtsson wrote:
R version/sessionInfo()?
/H
On Fri, May 21, 2010
Could be FAQ#7.22.
-Peter Ehlers
On 2010-05-22 13:00, Lars Bishop wrote:
Dear R/LaTex user,
I'm simply trying to include a plot created with the Lattice wireframe
function into LaTex. I have no problems including other R plots into LaTex
by exporting as a Postcript and then including the
I would like to run a logistic regression on some factor variables (main
effects and eventually an interaction) that are very sparse. I have a
moderately large dataset, ~100k observations with 1500 factor levels for one
variable (x1) and 600 for another (X2), creating ~19000 levels for the
One way to do it:
apply(B, 1, function(x) t(apply(A, 1, function(y) abs(y-x) )) )
- Original Message
From: David Neu da...@davidneu.com
To: r-help@r-project.org
Sent: Sat, May 22, 2010 10:35:32 AM
Subject: [R] Fast Matrix Computation
Hi,
I have two (large) matrices A and B
I hope this will help.
### Find rows with minimum value from every 5 rows
## Create the data
mlb - data.frame(mass_position=c(1,2,3,4,5,6,7,8,9,10,
11,12,13,14,15,16,17,18,19,20),
mass_value=c(9,2,3,2,5,6,7,8,9,10,2.1,12, 1,14,15,16,17,18,19,20),
One possibility:
n.A-nrow(A)
n.B-nrow(B)
abs( kronecker(A,rep(1,n.B)) - kronecker(rep(1,n.A),B) )
-tgs
On Sat, May 22, 2010 at 3:20 PM, Shi, Tao shida...@yahoo.com wrote:
One way to do it:
apply(B, 1, function(x) t(apply(A, 1, function(y) abs(y-x) )) )
- Original Message
Given a valid ftp address, is there a package that will allow me to get a
listing of the files/directory structure
on that site? RCurl looks to have this ability are there others?
[[alternative HTML version deleted]]
__
R-help@r-project.org
Hi list,
I would like to capture the console output of a Perl script by running the
script from R.
I have tried the following:
# Create perl script
cat( 'print Hello World\n;',file=hello.pl )
# Trial 1
system(command=c:\\Perl64\\bin\\perl hello.pl)
-I saw no output for the above command. I have
Hi David,
Here are two suggestions, one that works for the example you provided and a
second one for a more general case.
# Your example
A - matrix(c(1, 2, 3, 4, 5, 6), byrow=TRUE, ncol=3)
B - matrix(c(7, 8, 9), byrow=TRUE, ncol=3)
t(abs(t(A) - as.vector(B)))
# More general case
B1 -
Hi thank you both for your answers.
I did verify that the number of rows in the csv is actually ~207,000,
both in the MySQL output and then directly in the csv file. The line
128328 looks exactly as all others above and below.
I tried the comment.char and quote parameters and it turns out that
Any suggestions on the following would be grateful.
I'm trying to impute data, where a fictitional dataset is defined as...
set.seed(110)
n - 500
test - data.frame(smoke_status = rbinom(n, 2, 0.6), smoke_amount =
rbinom(n, 2, 0.5), rf1 = rnorm(n), rf2 = rnorm(n), outcome = rbinom(n,
1, 0.3))
After trying again your solution finally it worked with the collate field
in the DESCRIPTION file. The Warnings disappeared.
So indeed I have to thank you very much. Best wishes... Dan
On Sun, 7 Feb 2010, Martin Morgan wrote:
On 02/06/2010 03:39 PM, Daniel Kosztyla wrote:
Hello R-Team,
May
On 05/22/2010 02:19 PM, Robin Jeffries wrote:
I would like to run a logistic regression on some factor variables (main
effects and eventually an interaction) that are very sparse. I have a
moderately large dataset, ~100k observations with 1500 factor levels for one
variable (x1) and 600 for
Dear R users,
I know, this is the second time i return on this topic. Sorry, but this
analysis is of great value for me, and i hope someone can help me.
I need to model a time-varying effect in a Cox model. Briefly explained
here:
Hi,
I am thinking about using R to create a database, then create table in
MySQL server. Can I do that using RMySQL package?
I am familiar with RMySQL, and in the online help most of the sample
code assumes the database exists and transact with the table inside
the database.
Can someone
I'm looking for a function or package that will allow me to get a list of
the files at an ftp site.
RCurl looks promising. Are there other packages that have similar
functionality
[[alternative HTML version deleted]]
__
R-help@r-project.org
Dear R-helpers,
I would like to generate a variable that takes 0 or 1, and each subject has
different probabilities of taking the draw.
So, which of the following code I should use ?
suppose there are 5 subjects, and their probabilities of this Bernoulli
variable is p=c(0.2, 0.9, 0.15, 0.8,
Dear All,
I have an array some thing like this:
avglog
January February March April May June July
August September
60102 83397 56774 48785 49010 40572 38175
47037 51402
The class of avglog array.
class(avglog)
[1] array
str(avglog)
num
Carrie Li wrote:
Dear R-helpers,
I would like to generate a variable that takes 0 or 1, and each subject has
different probabilities of taking the draw.
So, which of the following code I should use ?
snip
I don't think either.
Try this:
probs - seq(0,1, by = .1)
sapply(probs, function(x)
Hi Carrie,
Use the first approach:
n - 5
p - c(0.2, 0.9, 0.15, 0.8, 0.75)
rbinom(n, 1, p)
# [1] 0 0 0 1 1
rbinom(n, 1, p)
# [1] 1 1 0 1 1
To check, replicate the analysis 5000 times and then estimate the
probability for each subject:
rowMeans(replicate(5000, rbinom(n, 1, p)))
# 0.2002 0.9026
Jorge Ivan Velez wrote:
# The same using a function foo
foo - function(A, B){
rA - 1:nrow(A)
rB - 1:nrow(B)
grid - as.matrix(expand.grid(rA, rB))
t(apply(grid, 1, function(x) abs(A[x[1], ] - B1[x[2], ])))
}
foo(A, B)
foo(A, B1)
As usual, there might be better and faster
Yes, it should be. Thank you for pointing that out. Apologies for the noise.
Regards,
Jorge
On Sun, May 23, 2010 at 1:07 AM, Berend Hasselman wrote:
Jorge Ivan Velez wrote:
# The same using a function foo
foo - function(A, B){
rA - 1:nrow(A)
rB - 1:nrow(B)
grid -
45 matches
Mail list logo