Displaying 20 results from an estimated 2000 matches similar to: "download.file"
2013 Apr 28
2
unsupported url scheme
fileUrl <- "https://data.baltimorecity.gov/api/views/dz54-2aru/rows.csv?accessType=DOWNLOAD"download.file(fileUrl,destfile="./data/Cameras.csv",method="curl") I tried it after installing package "RCurl" but it give error message: Error in download.file(fileUrl, destfile = "Cameras.csv") :
unsupported URL schemeI can you help me to solve this
2011 Sep 16
1
download files using ftp: avoid error
I am planning to download a large number of files from some website. I am
using the following script.
files2down = c('aaa', 'bbb', ................)
for (i in 1: len)
{
print(paste('downloading file', i, ' of total ', len));
url = paste(urlPrefix, files2down[i], sep='')
destfile = paste (dest, 'inDir', files2down[i], sep='/' )
2011 Jun 13
3
combine the data frames into comma separated list.
Hi R users,
I am new to R and am trying to merge data frames in the following way.
Suppose I have n data frames each with two fields. Field 1 is common among
data frames but may have different entries. Field 2 is different.
Data frame 1:
Src Target1
1 aaa
1 bbb
1 ccc
2 aaa
3 ddd
Data frame 2:
Src Target2
2 aaaa
3 dddd
4 bbbb
4
2011 Aug 19
3
installing packages systemwide
I installed some downloaded packages in R. I always do
$sudo R CMD INSTALL <anRpackage.tar.gz>
By default it is storing these packages into my directory
/home/mary/R/x86_64-pc-linux-gnu-library/2.13/.
However I want them to be systemwide into /usr/local/lib/R/site-library/
folder.
I tried
$sudo R
R> install.packages("anRpackage", dep=TRUE)
I did not succeed into getting
2011 Aug 19
3
installing packages systemwide
I installed some downloaded packages in R. I always do
$sudo R CMD INSTALL <anRpackage.tar.gz>
By default it is storing these packages into my directory
/home/mary/R/x86_64-pc-linux-gnu-library/2.13/.
However I want them to be systemwide into /usr/local/lib/R/site-library/
folder.
I tried
$sudo R
R> install.packages("anRpackage", dep=TRUE)
I did not succeed into getting
2012 Jul 22
4
pvalue calculate
I have a value
a=300
observation (x) = sample(1:50)
How to find a p-value from this. I need to show that "a" is different fom
mean(x).
Thanks
--
-------------
Mary Kindall
Yorktown Heights, NY
USA
[[alternative HTML version deleted]]
2011 Nov 16
1
read.table : fill missing entry with "unAvailable" [edit]
Hi R users,
I try to read a data file (tab delimited format) in which some of the
entries in a particular field are missing. Is it possible to fill the
unavailable data with 'UnAvailable' string while performing read.table()
Something like
df = read.table(DataFile, header=FALSE, fill_missing_entry = 'unAvailable')
1
thanks
--
-------------
Mary Kindall
Yorktown Heights,
2011 Dec 21
1
aggregate function
Hi
I have a data frame with values in following format.
param case1
1 a
2 b
2 c
2 d
3 e
4 f
how to use aggregate so that it I only one row for each 'param' value.
the output for the above input should be
param case1
1 a
2 b,c,d
3 e
4 f
Thanks
M
--
-------------
Mary
2012 Jan 06
1
(Edited) cbind alternate for data frames
>
> I have two dataframes and want to perform cbind and then write into a
> file. The number of entries are more than a million in both frames. R is
> taking a lot of time performing this operation.
>
> Is there any alternate way to perform cbind?
>
> x = table1[1:1000000,1:4]
> y = table2[1:1000000,3:6]
>
> z = cbind(x,y) //hanging the machine
>
>
2012 Jan 08
1
mode of frequency distribution table
In a frequency distribution table (bell shaped), how can we find the most
frequent range?
for example:
x = c(1,2, 4,4,4,4, 5,5,5,6,6,5,5,5,5,5,6,6,6,13, 17,17,30,100,300)
barplot(table(x))
In the code above, which function do we use to find that the most
frequent value range from 4 to 6.
Thanks.
--
-------------
Mary Kindall
Yorktown Heights, NY
USA
[[alternative HTML version deleted]]
2012 Jan 06
6
cbind alternate
I have two one dimensional list of elements and want to perform cbind and
then write into a file. The number of entries are more than a million in
both lists. R is taking a lot of time performing this operation.
Is there any alternate way to perform cbind?
x = table1[1:1000000,1]
y = table2[1:1000000,5]
z = cbind(x,y) //hanging the machine
write.table(z,'out.txt)
--
-------------
2011 Jun 14
1
[Resolved] combine the data frames into comma separated list.
Hi
Thanks Gabor for your suggestion. I am posting the code that worked for me.
dataframe1 = data.frame(cbind(Src = c(1,1,1,2,3), Target1 =
c('aaa','bbb','ccc','aaa','ddd'))); #must be data frame
dataframe2 = data.frame(cbind(Src = c(2,3,4,4,4), Target2 =
c('aaaa','dddd','bbbb','eeee','ffff')));
dataframe3 =
2012 Jan 12
1
relative frequency plot using ggplot or other function
Hi
I have a data frame in the following form. There are two groups and for
each 'width' relative frequency for group1 and group2 is given. How to plot
this in R using ggplot or other package.
Width relativeFrequency1 relativeFrequency2
1 100 0.0006388783 0.02265428
2 200 0.0022677303 0.02948625
3 300 0.0061182673 0.01739936
4 400 0.0152237225 0.02569902
5 500
2011 Jun 19
1
save and load in R
I have a list of txt files that I want to convert into .rdata R data
object.
filenames
1. "./file1.txt"
2. "./file2.txt"
3. "./file3.txt"
4. "./file4.txt"
5. "./file5.txt"
6. "./file6.txt"
7. "./file7.txt"
8. "./file8.txt"
9. "./file9.txt"
10. "./file10.txt"
I saved these files as
for ( i in
2012 Jan 16
1
ggplot- using geom_point and geom_line at the same time
Hi
I am plotting line chart using ggplot and want to use geom_line and
geom_point simultaneously.
I get the plot but now I have two legends. None of the legend is
representing the true values. I need the legend with shape and color both.
Thanks
> con = textConnection("inputs var1 var2 var3+ 100 10 5 2+ 1000 20 10 4+ 5000 30 15 8+ 10000 40 20 16+ 30000 50 25 32")> data =
2008 Mar 31
1
download.file error
Dear all,
I am looking for a way to work out if a file on the internet exists before attempting to download it using the function download.file(). For example,
using a url that does not exist
url <- "http://finance.yahoo.com/ftse.csv"
destfile <- tempfile()
download.file(url = url, destfile = destfile)
# gives the following response ...
trying URL
2010 Mar 19
1
error in map library
Dear Ruser,
>
>
> I am trying to use the map library. But unfortunately I am facing the
> warning message above:
> Warning message:
> *In readGDAL(destfile, silent = TRUE) : GeoTransform values not available
> *
I want to use that library because I intend to plot some station in a
Brazilian map.
I really appreciate any help.
>
>
===here what I was testing========
2008 Oct 01
1
changing 'https' to 'http' when using download.file(), any side effects or just use RCurl?
Dear R-Help,
>From reading the help file, it is my understanding the the download.file()
function does not support HTTPS connections. So therefore, understandably,
the follow produces an error:
### R Code
> url <- "https://stat.ethz.ch/pipermail/r-help/2008-October/thread.html"
> destfile <- "//PFO-SBS001/Redirected/tonyb/Desktop/R_web_test/tmp.txt"
>
2008 Sep 04
1
Error with update.packages()
R-helpers:
I just updated from R 7.0 to R 7.2.2 today. I am using MAC OS X
version 10.5.4 on a Macbook to run R.
----------------------------
> sessionInfo()
R version 2.7.2 (2008-08-25)
i386-apple-darwin8.11.1
locale:
en_US.UTF-8/en_US.UTF-8/C/C/en_US.UTF-8/en_US.UTF-8
attached base packages:
[1] stats graphics grDevices utils datasets methods base
loaded via a namespace
2007 Mar 08
1
cant fully capture child output
I cant seem to get the io from a child process of a worker back to my
client. There most be something academic I''m missing :/. I looked at
examples in Pickaxe and Ruby PLEAC library ... and I believe the following
should work:
# called from within do_work...
def backup(repo)
logger.info(''SvnWorker backup repo ''+repo)
tmp = []
my_project =