Displaying 20 results from an estimated 1000 matches similar to: "Issue with concatenation of URL losing"
2018 Jan 24
0
Issue with concatenation of URL losing
a) you need to read the help pages on the paste function... more likely
you are looking for the paste0 function because extra spaces will most
likely break the GET request format.
b) quotes do not become "stuck" as \" ... that is a visual representation
intended to clarify that that quote is not terminating the string but is
actually part of it. If you want to see the contents
2001 Feb 27
1
using fmod in C code to be loaded into R
Dear People,
I wrote the following bit of C code and (along with other bits) called it
mycode.c, and compiled the file into a shared library to load into R,
using R CMD SHLIB mycode.c. This was Ok, but when I tried to load this
into R using dyn.load("mycode.so") I got the error
> dyn.load("mycode.so")
Error in dyn.load(x, as.logical(local), as.logical(now)) :
unable to
2005 Dec 28
1
segmetation fault
Hey,
I don;t know if anyone has come across this error before...
I am running R on the terminal of my MAC OS X 10.3.4 and I have written C code and compiled it using
R CMD SHLIB mycode.c
There were no problems in compiling so I now have mycode.o and mycode.so.
I used dyn.load("mycode.so") and again, no problems. But when I try to use the code .C("mycode",x)
2018 Jan 19
5
API de AEMET con R?
Desde el terminal de Ubuntu, he conseguido descargar los datos usando esto:
DESCARGAR LISTA DE ESTACIONES
wget --method GET --header 'cache-control: no-cache' --no-check-certificate
--output-document -
https://opendata.aemet.es/opendata/api/valores/climatologicos/inventarioestaciones/todasestaciones/?api_key=*vuestra
api key*
DESCARGAR DATOS HISTÓRICOS
Diciembre 2017, ALICANTE
wget
2015 Oct 09
4
A where() functions that does what exists() does but return the environment when object lives?
Hi,
exists("foo", inherits=TRUE) check whether an object named "foo"
exists, and get("foo", inherits=TRUE) retrieves it. I'm looking for a
similar function to exists() that returns the environment where the
object "foo" exists, iff at all. If not found, NULL is returned.
Does that exist?
EXAMPLE #1:
> sample2 <- base::sample
> env <-
2010 Nov 02
2
One question on heatmap
Dear R-helper:
Suppose we have a matrix:
Gene sample1 sample2
Gcnt1 12.0000 52.80000
Max 8.8000 39.10000
Tmem176b 67.9000 304.70000
Shmt2 8.6000 42.40000
Rtn4 11.5000 57.70000
Il17re 7.6000 38.80000
Bclp2 6.2000 32.10000
Mobkl3 4.4000 32.20000
Akr1b10 3.4000 30.10000
2008 Oct 16
1
apply, t-test and p-values
R 2.7.2
Windows XP
I am using apply to compute a series of Student's t-test from two matrices, sample1 and sample2.
boo<-apply(sample1,1,t.test,sample2)
I want to pick of the p-values from the tests, but can't seem to get it to work. I have tried several methods to get the values including:
boo<-apply(sample1,1,t.test$t.test,sample2)
boo<-apply(sample1,1,t.test,sample2)$t.test
2012 Dec 04
2
computing marginal values based on multiple columns?
Hello all,
I have what feels like a simple problem, but I can't find an simple
answer. Consider this data frame:
> x <- data.frame(sample1=c(35,176,182,193,124),
sample2=c(198,176,190,23,15), sample3=c(12,154,21,191,156),
class=c('a','a','c','b','c'))
> x
sample1 sample2 sample3 class
1 35 198 12 a
2 176 176
2011 Sep 26
1
How to Store the executed values in a dataframe & rle function
Hi group,
This is how my test file looks like:
Chr start end sample1 sample2
chr2 9896633 9896683 0 0
chr2 9896639 9896690 0 0
chr2 14314039 14314098 0 -0.35
chr2 14404467 14404502 0 -0.35
chr2 14421718 14421777 -0.43 -0.35
chr2 16031710 16031769 -0.43 -0.35
chr2 16036178 16036237 -0.43 -0.35
chr2 16048665 16048724 -0.43 -0.35
chr2 37491676 37491735 0 0
chr2 37702947 37703009 0 0
2011 Aug 14
2
conditional filter resulting in 2 new dataframes
This is what I am starting with:
initial<- matrix(c(1,5,4,8,4,4,8,6,4,2,7,5,4,5,3,2,4,6), nrow=6,
ncol=3,dimnames=list(c("1900","1901","1902","1903","1904","1905"),
c("sample1","sample2","sample3")))
And I need to apply a filter (in this case, any value <5) to give me one
dataframe with only the
2010 Oct 04
1
source package build/installation with subdirectory-lib
hi all - i have a source package i'm writing that i'd like to be able
to install with a special library that my R src files rely on.
to be more precise, i have a normal R package directory structure
(i.e. src/ R/ man/ DESCRIPTION NAMESPACE etc.).
i also have another directory here called depPkg, and it has it's own
configure file for the canonical './configure && make
2006 Apr 21
5
Simple Question: How to merge SQL results?
Hopefully an easy one, how do I merge two or more SQL query results?
Example:
result1 = find_by_sql(x)
result2 = find_by_sql(y)
What is the best way to merge result1 and result2? I want to be able
to reference the objects as if they were obtained via one query.
Cheers,
Dan
2009 Feb 02
1
A question regarding bootstrap
Dear List Members,
I have two small samples (n=20), the distributions are highly skewed. Does
it make any sense to do a boostrap test to check for difference in means?
And if so, could this be done like this:
x <- numeric(10000)
for(i in 1:10000) {
x[i] <- mean(sample(sample1,replace=TRUE)) -
mean(sample(sample2,replace=TRUE))
}
(mean(sample1)-mean(sample2))/sd(x)
Regards,
Erika
2010 Nov 09
2
Creating a list to store output objects from a recursive loop
Dear Group,
I am having a function that I am running in a loop that generated two
results for each loop
The result1 is a zoo object
The result2 is a data frame
Now I want to put both of them in a list or some structure ... that I can
access or output to a file after the loop is done.
For e.g.
for (i in 1:20){
niceFunction(x[i],i)
}
niceFunction (x,i) {
result1 = someOperations() #zoo
2013 Mar 18
2
Fit a mixture of lognormal and normal distributions
Hello
I am trying to find an automated way of fitting a mixture of normal and log-normal distributions to data which is clearly bimodal.
Here's a simulated example:
x.1<-rnorm(6000, 2.4, 0.6)x.2<-rlnorm(10000, 1.3,0.1)X<-c(x.1, x.2)
hist(X,100,freq=FALSE, ylim=c(0,1.5))lines(density(x.1), lty=2, lwd=2)lines(density(x.2), lty=2, lwd=2)lines(density(X), lty=4)
Currently i am using
2010 Sep 07
1
average columns of data frame corresponding to replicates
Hi Group,
I have a data frame below. Within this data frame there are samples
(columns) that are measured more than once. Samples are indicated by
"idx". So "id1" is present in columns 1, 3, and 5. Not every id is
repeated. I would like to create a new data frame so that the repeated
ids are averaged. For example, in the new data frame, columns 1, 3,
and 5 of the original
2008 Jul 08
6
Question: Beginner stuck in a R cycle
Dear All,
I have a database of 200 observations named myD.
In the dataframe there are a column named code (with codes varying from 1 to 77), a column named "prevalence" with some quantitative measurements are given and an column named Pr_mean, with no values.
I would like to set a cycle to compute the average of prevalence values for each different code and store the averages under the
2007 May 10
1
how to pass "arguments" to a function within a function?
I have searched the r-help files but have not been able to find an answer to this question. I apologize if this questions has been asked previously.
(Please excuse the ludicrousness of this example, as I have simplified my task for the purposes of this help inquiry. Please trust me that something like this will in fact be useful what I am trying to accomplish. I am using R 2.4.1 in Windows XP.)
2010 Nov 04
2
Converting Strings to Variable names
Hi all,
I am processing 24 samples data and combine them in single table called
CombinedSamples using following:
CombinedSamples<-rbind(Sample1,Sample2,Sample3)
Now variables Sample1, Sample2 and Sample3 have many different columns.
To make it more flexible for other samples I'm replacing above code with a
for loop:
#Sample is a string vector containing all 24 sample names
for (k in
2008 Apr 03
3
loading settings from database
I''m just wondering what the best way to go about loading my API keys
from the database is ...
Should I simply place them in the ENV variable?
Is there a way better way to go about this?